From 1aff9b620eba8850b4819ebf32ed9fcf958e652c Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 16 Oct 2009 01:35:55 +0200 Subject: partx: use c.h Signed-off-by: Karel Zak --- partx/partx.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'partx/partx.c') diff --git a/partx/partx.c b/partx/partx.c index 25485fff2..16ea1fab0 100644 --- a/partx/partx.c +++ b/partx/partx.c @@ -43,14 +43,13 @@ #endif #include +#include "c.h" #include "blkdev.h" #include "partx.h" #include "crc32.h" static void errmerge(int err, int m, char *msg1, char *msg2); -#define SIZE(a) (sizeof(a)/sizeof((a)[0])) - #define MAXTYPES 64 #define MAXSLICES 256 @@ -264,7 +263,7 @@ main(int argc, char **argv){ for (i = 0; i < ptct; i++) { ptp = &pts[i]; if (!type || !strcmp(type, ptp->type)) { - n = ptp->fn(fd, all, slices, SIZE(slices)); + n = ptp->fn(fd, all, slices, ARRAY_SIZE(slices)); if (n >= 0 && verbose) printf("%s: %d slices\n", ptp->type, n); if (n > 0 && (verbose || what == LIST)) { -- cgit v1.2.3-55-g7522