]> git.neil.brown.name Git - git.git/blobdiff - strbuf.c
strbuf: change an always NULL/"" strbuf_addftime() param to bool
[git.git] / strbuf.c
index be3b9e37b1d969e86e913cc69ccab935f516a063..89e40bb496b99855e3408fdfa07dbcf851b8a08d 100644 (file)
--- a/strbuf.c
+++ b/strbuf.c
@@ -786,7 +786,7 @@ char *xstrfmt(const char *fmt, ...)
 }
 
 void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
-                    int tz_offset, const char *tz_name)
+                    int tz_offset, int suppress_tz_name)
 {
        struct strbuf munged_fmt = STRBUF_INIT;
        size_t hint = 128;
@@ -815,8 +815,7 @@ void strbuf_addftime(struct strbuf *sb, const char *fmt, const struct tm *tm,
                        fmt++;
                        break;
                case 'Z':
-                       if (tz_name) {
-                               strbuf_addstr(&munged_fmt, tz_name);
+                       if (suppress_tz_name) {
                                fmt++;
                                break;
                        }