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.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-02-15 08:50:45 +01:00
parent 97ab9dfc0d
commit 923e2122d0
+1 -1
View File
@@ -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);