diff options
author | Li Qiang <liq3ea@gmail.com> | 2018-11-30 01:53:58 -0800 |
---|---|---|
committer | Laurent Vivier <laurent@vivier.eu> | 2018-12-11 18:28:47 +0100 |
commit | 9e722ebc0668d045dc65585e96954082eafedd99 (patch) | |
tree | b55b325a336f6dc8ca1df841f19b203ab702b026 /util/vfio-helpers.c | |
parent | 1d4f78e93ac03e7d8ac845822b2c5ad87e77e2d2 (diff) |
util: vfio-helpers: use ARRAY_SIZE in qemu_vfio_init_pci()
Cc: qemu-trivial@nongnu.org
Signed-off-by: Li Qiang <liq3ea@gmail.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1543571638-2892-1-git-send-email-liq3ea@gmail.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Diffstat (limited to 'util/vfio-helpers.c')
-rw-r--r-- | util/vfio-helpers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/vfio-helpers.c b/util/vfio-helpers.c index cccc9cd42e..342d4a2285 100644 --- a/util/vfio-helpers.c +++ b/util/vfio-helpers.c @@ -348,7 +348,7 @@ static int qemu_vfio_init_pci(QEMUVFIOState *s, const char *device, goto fail; } - for (i = 0; i < 6; i++) { + for (i = 0; i < ARRAY_SIZE(s->bar_region_info); i++) { ret = qemu_vfio_pci_init_bar(s, i, errp); if (ret) { goto fail; |