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:
parent
aab3661bd2
commit
b7c61286de
|
|
@ -630,8 +630,7 @@ int parse_action_control_slash(int *argc_p, char ***argv_p,
|
||||||
allow_num);
|
allow_num);
|
||||||
*p = 0;
|
*p = 0;
|
||||||
if (action_a2n(*argv, &result1, allow_num)) {
|
if (action_a2n(*argv, &result1, allow_num)) {
|
||||||
if (p)
|
*p = '/';
|
||||||
*p = '/';
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue