diff options
author | Karel Zak | 2011-03-18 10:27:09 +0100 |
---|---|---|
committer | Karel Zak | 2011-03-18 10:27:09 +0100 |
commit | 95cc3573e170b324b80074e92056bff43ebb730d (patch) | |
tree | 5f38d9798241bbc6eec8efb89968a22c89241bc6 /misc-utils/ddate.c | |
parent | ddate: remove non-ascii chars from ddate (diff) | |
download | kernel-qcow2-util-linux-95cc3573e170b324b80074e92056bff43ebb730d.tar.gz kernel-qcow2-util-linux-95cc3573e170b324b80074e92056bff43ebb730d.tar.xz kernel-qcow2-util-linux-95cc3573e170b324b80074e92056bff43ebb730d.zip |
ddate: use ARRAY_SIZE
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'misc-utils/ddate.c')
-rw-r--r-- | misc-utils/ddate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/misc-utils/ddate.c b/misc-utils/ddate.c index 62f830d67..59e1e132f 100644 --- a/misc-utils/ddate.c +++ b/misc-utils/ddate.c @@ -61,7 +61,9 @@ #include <string.h> #include <time.h> #include <stdio.h> + #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", |