]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
time-util: condition size check based on utc mode
authorLennart Poettering <lennart@poettering.net>
Fri, 20 Jan 2023 15:54:22 +0000 (16:54 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 20 Jan 2023 16:44:59 +0000 (17:44 +0100)
src/basic/time-util.c

index dcafad48828ed3f4407283134b50b20367b24ffb..791d83a5d8acbdbbce40c790af7ab22fa94f7341 100644 (file)
@@ -333,7 +333,7 @@ char *format_timestamp_style(
                           1 + 10 +             /* space and date */
                           1 + 8 +              /* space and time */
                           (us ? 1 + 6 : 0) +   /* "." and microsecond part */
-                          1 + 1 +              /* space and shortest possible zone */
+                          1 + (utc ? 3 : 1) +  /* space and shortest possible zone */
                           1))
                 return NULL; /* Not enough space even for the shortest form. */