diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c index 14df052cf7b..0698fcd3e83 100644 --- a/extras/floppy/create_floppy_devices.c +++ b/extras/floppy/create_floppy_devices.c @@ -137,7 +137,7 @@ int main(int argc, char **argv) return 1; } - if (type < 0 || type >= (int) (sizeof(table_sup) / sizeof(table_sup[0]))) { + if (type < 0 || type >= (int) ARRAY_SIZE(table_sup)) { fprintf(stderr,"Invalid CMOS type %d\n", type); return 1; }