diff options
Diffstat (limited to 'coreutils/date.c')
-rw-r--r-- | coreutils/date.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/coreutils/date.c b/coreutils/date.c index dfc8b2f40..d2d77f413 100644 --- a/coreutils/date.c +++ b/coreutils/date.c | |||
@@ -69,15 +69,15 @@ int date_main(int argc, char **argv) | |||
69 | if (!isofmt_arg) { | 69 | if (!isofmt_arg) { |
70 | ifmt = 0; /* default is date */ | 70 | ifmt = 0; /* default is date */ |
71 | } else { | 71 | } else { |
72 | const char * const isoformats[] = | 72 | static const char * const isoformats[] = |
73 | {"date", "hours", "minutes", "seconds"}; | 73 | { "date", "hours", "minutes", "seconds" }; |
74 | 74 | ||
75 | for (ifmt = 0; ifmt < 4; ifmt++) | 75 | for (ifmt = 0; ifmt < 4; ifmt++) |
76 | if (!strcmp(isofmt_arg, isoformats[ifmt])) { | 76 | if (!strcmp(isofmt_arg, isoformats[ifmt])) |
77 | break; | 77 | goto found; |
78 | } | 78 | /* parse error */ |
79 | if (ifmt == 4) /* parse error */ | 79 | bb_show_usage(); |
80 | bb_show_usage(); | 80 | found: ; |
81 | } | 81 | } |
82 | } | 82 | } |
83 | 83 | ||
@@ -207,7 +207,7 @@ int date_main(int argc, char **argv) | |||
207 | date_fmt[i++] = '%'; | 207 | date_fmt[i++] = '%'; |
208 | date_fmt[i++] = 'S'; | 208 | date_fmt[i++] = 'S'; |
209 | } | 209 | } |
210 | format_utc: | 210 | format_utc: |
211 | date_fmt[i++] = '%'; | 211 | date_fmt[i++] = '%'; |
212 | date_fmt[i] = (opt & DATE_OPT_UTC) ? 'Z' : 'z'; | 212 | date_fmt[i] = (opt & DATE_OPT_UTC) ? 'Z' : 'z'; |
213 | } | 213 | } |