aboutsummaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2007-04-08 16:07:02 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2007-04-08 16:07:02 +0000
commit240a1cfbbe6cf42e8013ce06cb567b3f28c8727f (patch)
tree8e69bb572dbb2636689a15b21d7a646e942b5091 /coreutils/date.c
parent5694d5f8d22be2f5be53b2d0ce2e0283ef57d93f (diff)
downloadbusybox-240a1cfbbe6cf42e8013ce06cb567b3f28c8727f.tar.gz
add some missed statics on constant objects.
fix few #ifndef ENABLE_xxx # size busybox_old busybox_unstripped text data bss dec hex filename 677152 2920 18208 698280 aa7a8 busybox_old 676420 2920 18208 697548 aa4cc busybox_unstripped
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c16
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)
if (!isofmt_arg) {
ifmt = 0; /* default is date */
} else {
- const char * const isoformats[] =
- {"date", "hours", "minutes", "seconds"};
+ static const char * const isoformats[] =
+ { "date", "hours", "minutes", "seconds" };
for (ifmt = 0; ifmt < 4; ifmt++)
- if (!strcmp(isofmt_arg, isoformats[ifmt])) {
- break;
- }
- if (ifmt == 4) /* parse error */
- bb_show_usage();
+ if (!strcmp(isofmt_arg, isoformats[ifmt]))
+ goto found;
+ /* parse error */
+ bb_show_usage();
+ found: ;
}
}
@@ -207,7 +207,7 @@ int date_main(int argc, char **argv)
date_fmt[i++] = '%';
date_fmt[i++] = 'S';
}
-format_utc:
+ format_utc:
date_fmt[i++] = '%';
date_fmt[i] = (opt & DATE_OPT_UTC) ? 'Z' : 'z';
}