summaryrefslogtreecommitdiff
path: root/coreutils/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/date.c')
-rw-r--r--coreutils/date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/date.c b/coreutils/date.c
index 652db8d..199a894 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -202,8 +202,8 @@ int date_main(int argc, char **argv)
usage(date_usage);
}
} else {
- if ((date_fmt == NULL) && (strcmp(*argv, "+") == 0))
- date_fmt = *argv;
+ if ((date_fmt == NULL) && (**argv == '+'))
+ date_fmt = *argv + 1; /* Skip over the '+' */
else if (date_str == NULL) {
set_time = 1;
date_str = *argv;