From: Phil Sutter Date: Fri, 1 Sep 2017 16:52:55 +0000 (+0200) Subject: tc_util: No need to terminate an snprintf'ed buffer X-Git-Tag: v4.13.0~8 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9376314b49a47eb42ade3fc0d41cb51438f8dbc6;p=thirdparty%2Fiproute2.git tc_util: No need to terminate an snprintf'ed buffer snprintf() won't leave the buffer unterminated, so manually terminating is not necessary here. Signed-off-by: Phil Sutter --- diff --git a/tc/tc_util.c b/tc/tc_util.c index 371046839..50d355046 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -434,7 +434,6 @@ static const char *action_n2a(int action) return "trap"; default: snprintf(buf, 64, "%d", action); - buf[63] = '\0'; return buf; } }