diff options
| author | Michael S. Tsirkin <mst@redhat.com> | 2017-01-18 22:07:34 +0200 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2017-02-01 03:37:17 +0200 |
| commit | ed63ec0d22ccdce3b2222d9a514423b7fbba3a0d (patch) | |
| tree | e8c361e656f9e039332374484dd1f8607317a219 /hw/pci/pci.c | |
| parent | d757573e69f2ef58a4a7b41f6c55d65fa1e1c5c2 (diff) | |
| download | focaccia-qemu-ed63ec0d22ccdce3b2222d9a514423b7fbba3a0d.tar.gz focaccia-qemu-ed63ec0d22ccdce3b2222d9a514423b7fbba3a0d.zip | |
ARRAY_SIZE: check that argument is an array
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to ARRAY_SIZE before we allow more of these in the code-base. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hw/pci/pci.c')
0 files changed, 0 insertions, 0 deletions