From: Zbigniew Jędrzejewski-Szmek Date: Sun, 14 Feb 2021 15:02:47 +0000 (+0100) Subject: basic/signal-util: drop unneeded extra byte from buffer X-Git-Tag: v248-rc1~127^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=923e2122d09ba577a933b0fb5c7d52cbfa05b080;p=thirdparty%2Fsystemd.git 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. --- diff --git a/src/basic/signal-util.c b/src/basic/signal-util.c index c04f8be05bb..331295c2c50 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);