diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:45:52 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 07:45:52 +0000 |
commit | cbe4cdc48486fbedede448aa59aa6a367efa1038 (patch) | |
tree | 6fc30a23fe7642fd93c5c6c702c4bc8ed5640b38 /lib/common/iso8601.c | |
parent | Adding debian version 2.1.6-5. (diff) | |
download | pacemaker-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.c | 3 |
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); |