From: Karel Zak Date: Fri, 18 Mar 2011 09:27:09 +0000 (+0100) Subject: ddate: use ARRAY_SIZE X-Git-Tag: v2.20-rc1~429 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95cc3573e170b324b80074e92056bff43ebb730d;p=thirdparty%2Futil-linux.git ddate: use ARRAY_SIZE Signed-off-by: Karel Zak --- diff --git a/misc-utils/ddate.c b/misc-utils/ddate.c index 62f830d672..59e1e132f0 100644 --- a/misc-utils/ddate.c +++ b/misc-utils/ddate.c @@ -61,7 +61,9 @@ #include #include #include + #include "nls.h" +#include "c.h" #ifndef __GNUC__ #define inline /* foo */ @@ -265,9 +267,9 @@ void format(char *buf, const char* fmt, struct disc_time dt) case 'N': if(dt.day!=4&&dt.day!=49) goto eschaton; break; case 'n': *(bufptr++)='\n'; break; case 't': *(bufptr++)='\t'; break; - + case 'Y': sprintf(snarf, "%d", dt.year); wibble=snarf; break; - case '.': wibble=sel(excl, sizeof(excl)/sizeof(excl[0])); + case '.': wibble=sel(excl, ARRAY_SIZE(excl)); break; #ifdef KILL_BOB case 'X': sprintf(snarf, "%d",