chiark / gitweb /
floppy: use ARRAY_SIZE()
authorKay Sievers <kay.sievers@vrfy.org>
Sun, 23 Nov 2008 16:29:37 +0000 (17:29 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Sun, 23 Nov 2008 16:29:37 +0000 (17:29 +0100)
extras/floppy/create_floppy_devices.c

index 14df052cf7b7e4964edc220fb9863ca5735b99cc..0698fcd3e83cf629f0e3173aa70eb0eed9afb7e5 100644 (file)
@@ -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;
        }