Skip to content
Snippets Groups Projects
Commit 9e722ebc authored by Li Qiang's avatar Li Qiang Committed by Laurent Vivier
Browse files

util: vfio-helpers: use ARRAY_SIZE in qemu_vfio_init_pci()


Cc: qemu-trivial@nongnu.org

Signed-off-by: default avatarLi Qiang <liq3ea@gmail.com>
Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <1543571638-2892-1-git-send-email-liq3ea@gmail.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 1d4f78e9
No related branches found
No related tags found
No related merge requests found
......@@ -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;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment