mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2024-11-28 18:28:23 -05:00
Remove a pointer check that can never be true
chan is set to the result of pointer arithmetic (pointer to an entry in an array) that can never be NULL. As such, there is no need to check for it to be non-NULL before deference. Remove this check to avoid complaints from static analyzers. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
a95cc47a92
commit
896607d36b
@ -956,8 +956,6 @@ static struct hostapd_channel_data * hostapd_get_mode_channel(
|
||||
|
||||
for (i = 0; i < iface->current_mode->num_channels; i++) {
|
||||
chan = &iface->current_mode->channels[i];
|
||||
if (!chan)
|
||||
return NULL;
|
||||
if ((unsigned int) chan->freq == freq)
|
||||
return chan;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user