From: Kay Sievers Date: Sun, 23 Nov 2008 16:29:37 +0000 (+0100) Subject: floppy: use ARRAY_SIZE() X-Git-Tag: 174~1287 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=commitdiff_plain;h=45a9e9e27b9a497985ec68d6a21e2e4eea05922b floppy: use ARRAY_SIZE() --- diff --git a/extras/floppy/create_floppy_devices.c b/extras/floppy/create_floppy_devices.c index 14df052cf..0698fcd3e 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; }