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 <p...@nwl.cc> --- tc/tc_util.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tc/tc_util.c b/tc/tc_util.c index b39e5508235ed..b01362533cd56 100644 --- a/tc/tc_util.c +++ b/tc/tc_util.c @@ -631,8 +631,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; } -- 2.13.1