From: Phil Sutter Date: Wed, 15 Nov 2017 14:01:30 +0000 (+0100) Subject: tc_util: Drop needless pointer check X-Git-Tag: v4.16.0~133 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b7c61286de9e65ed3919eb4c3b6965afe9b87c8c;p=thirdparty%2Fiproute2.git tc_util: Drop needless pointer check The function parse_action_control_slash() returns early if 'p' is NULL, so after the first call to action_a2n(), 'p' is guaranteed not to be NULL. Otherwise, the assignment '*p = 0' above would dereference the NULL pointer already anyway, so just drop this check here. Signed-off-by: Phil Sutter --- diff --git a/tc/tc_util.c b/tc/tc_util.c index 472fc5db7..9df74da3b 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -630,8 +630,7 @@ int parse_action_control_slash(int *argc_p, char ***argv_p, allow_num); *p = 0; if (action_a2n(*argv, &result1, allow_num)) { - if (p) - *p = '/'; + *p = '/'; return -1; }