summaryrefslogtreecommitdiffstats
path: root/lib/common/iso8601.c
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:45:52 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 07:45:52 +0000
commitcbe4cdc48486fbedede448aa59aa6a367efa1038 (patch)
tree6fc30a23fe7642fd93c5c6c702c4bc8ed5640b38 /lib/common/iso8601.c
parentAdding debian version 2.1.6-5. (diff)
downloadpacemaker-cbe4cdc48486fbedede448aa59aa6a367efa1038.tar.xz
pacemaker-cbe4cdc48486fbedede448aa59aa6a367efa1038.zip
Merging upstream version 2.1.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib/common/iso8601.c')
-rw-r--r--lib/common/iso8601.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/common/iso8601.c b/lib/common/iso8601.c
index 3e000e1..9de018f 100644
--- a/lib/common/iso8601.c
+++ b/lib/common/iso8601.c
@@ -1930,9 +1930,10 @@ pcmk__readable_interval(guint interval_ms)
#define MS_IN_H (MS_IN_M * 60)
#define MS_IN_D (MS_IN_H * 24)
#define MAXSTR sizeof("..d..h..m..s...ms")
- static char str[MAXSTR] = { '\0', };
+ static char str[MAXSTR];
int offset = 0;
+ str[0] = '\0';
if (interval_ms > MS_IN_D) {
offset += snprintf(str + offset, MAXSTR - offset, "%ud",
interval_ms / MS_IN_D);