diff options
Diffstat (limited to 'builtin/for-each-ref.c')
-rw-r--r-- | builtin/for-each-ref.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin/for-each-ref.c b/builtin/for-each-ref.c index cb7db230d3..d757837c15 100644 --- a/builtin/for-each-ref.c +++ b/builtin/for-each-ref.c @@ -389,7 +389,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam char *zone; unsigned long timestamp; long tz; - enum date_mode date_mode = DATE_NORMAL; + struct date_mode date_mode = { DATE_NORMAL }; const char *formatp; /* @@ -401,7 +401,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam formatp = strchr(atomname, ':'); if (formatp != NULL) { formatp++; - date_mode = parse_date_format(formatp); + parse_date_format(formatp, &date_mode); } if (!eoemail) @@ -412,7 +412,7 @@ static void grab_date(const char *buf, struct atom_value *v, const char *atomnam tz = strtol(zone, NULL, 10); if ((tz == LONG_MIN || tz == LONG_MAX) && errno == ERANGE) goto bad; - v->s = xstrdup(show_date(timestamp, tz, date_mode)); + v->s = xstrdup(show_date(timestamp, tz, &date_mode)); v->ul = timestamp; return; bad: |