aboutsummaryrefslogtreecommitdiff
path: root/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'date.c')
-rw-r--r--date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/date.c b/date.c
index 652db8d74..199a894c0 100644
--- a/date.c
+++ b/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;