P2P: Make p2p_check_pref_chan_no_recv() easier for static analyzers
Add an explicit check for msg->channel_list != NULL instead of depending on msg->channel_list_len > 0 implying that. This is to silence invalid static analyzer reports. Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
857c4dfa83
commit
afa0b9b6c5
1 changed files with 2 additions and 2 deletions
|
@ -582,8 +582,8 @@ static void p2p_check_pref_chan_no_recv(struct p2p_data *p2p, int go,
|
||||||
&op_channel) < 0)
|
&op_channel) < 0)
|
||||||
continue; /* cannot happen due to earlier check */
|
continue; /* cannot happen due to earlier check */
|
||||||
for (j = 0; j < msg->channel_list_len; j++) {
|
for (j = 0; j < msg->channel_list_len; j++) {
|
||||||
|
if (!msg->channel_list ||
|
||||||
if (op_channel != msg->channel_list[j])
|
op_channel != msg->channel_list[j])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
p2p->op_reg_class = op_class;
|
p2p->op_reg_class = op_class;
|
||||||
|
|
Loading…
Reference in a new issue