Skip to content

Commit

Permalink
Fix logical condition that would otherwise always be "false".
Browse files Browse the repository at this point in the history
Reported by:	gcc-12
  • Loading branch information
sobomax committed Feb 16, 2023
1 parent e47c512 commit 6d39836
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mi/mi_trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ int parse_mi_cmd_bwlist(int id, char* bw_string, int len)
return -1;
}

if ( (tok_end - bw_string) >= len || tok_end + 1 == 0) {
if ( (tok_end - bw_string) >= len || tok_end[1] == '\0') {
LM_ERR("no command in list!\n");
return -1;
}
Expand Down

0 comments on commit 6d39836

Please sign in to comment.