diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-14 16:02:47 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2021-02-15 08:50:45 +0100 |
commit | 923e2122d09ba577a933b0fb5c7d52cbfa05b080 (patch) | |
tree | f422475e5e48870b1f83245c8f9729bbe7bda559 | |
parent | systemctl,loginctl,machinectl: add --signal=list (diff) | |
download | systemd-923e2122d09ba577a933b0fb5c7d52cbfa05b080.tar.xz systemd-923e2122d09ba577a933b0fb5c7d52cbfa05b080.zip |
basic/signal-util: drop unneeded extra byte from buffer
DECIMAL_STR_MAX() already returns +1 for NULL, so no need to do it
a second time.
-rw-r--r-- | src/basic/signal-util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/signal-util.c b/src/basic/signal-util.c index c04f8be05b..331295c2c5 100644 --- a/src/basic/signal-util.c +++ b/src/basic/signal-util.c @@ -198,7 +198,7 @@ static const char *const __signal_table[] = { DEFINE_PRIVATE_STRING_TABLE_LOOKUP(__signal, int); const char *signal_to_string(int signo) { - static thread_local char buf[STRLEN("RTMIN+") + DECIMAL_STR_MAX(int) + 1]; + static thread_local char buf[STRLEN("RTMIN+") + DECIMAL_STR_MAX(int)]; const char *name; name = __signal_to_string(signo); |