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 <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2017-11-15 15:01:30 +01:00 committed by Stephen Hemminger
parent aab3661bd2
commit b7c61286de

View File

@ -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;
}