Signed-off-by: Jiri Denemark <jdenemar@xxxxxxxxxx> --- src/cpu/cpu.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cpu/cpu.c b/src/cpu/cpu.c index c8d50e7..11a68f0 100644 --- a/src/cpu/cpu.c +++ b/src/cpu/cpu.c @@ -35,7 +35,6 @@ #include "util/virstring.h" -#define NR_DRIVERS ARRAY_CARDINALITY(drivers) #define VIR_FROM_THIS VIR_FROM_CPU VIR_LOG_INIT("cpu.cpu"); @@ -60,7 +59,7 @@ cpuGetSubDriver(virArch arch) return NULL; } - for (i = 0; i < NR_DRIVERS; i++) { + for (i = 0; i < ARRAY_CARDINALITY(drivers); i++) { for (j = 0; j < drivers[i]->narch; j++) { if (arch == drivers[i]->arch[j]) return drivers[i]; @@ -79,7 +78,7 @@ cpuGetSubDriverByName(const char *name) { size_t i; - for (i = 0; i < NR_DRIVERS; i++) { + for (i = 0; i < ARRAY_CARDINALITY(drivers); i++) { if (STREQ_NULLABLE(name, drivers[i]->name)) return drivers[i]; } -- 2.9.0 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list