Fix: address of array 'dvobj->padapters' will always evaluate to 'true'

This commit is contained in:
Rin Cat 2020-08-02 06:21:39 -04:00
parent 5a2a7eb70d
commit fbf42d905a
No known key found for this signature in database
GPG Key ID: 7E93675C2BDBB222

View File

@ -4400,7 +4400,7 @@ static u8 rtw_ap_update_chbw_by_ifbmp(struct dvobj_priv *dvobj, u8 ifbmp
int i;
for (i = 0; i < dvobj->iface_nums; i++) {
if (!(ifbmp & BIT(i)) || !dvobj->padapters)
if (!(ifbmp & BIT(i)) || &(dvobj->padapters) == NULL)
continue;
iface = dvobj->padapters[i];
@ -4420,7 +4420,7 @@ static u8 rtw_ap_update_chbw_by_ifbmp(struct dvobj_priv *dvobj, u8 ifbmp
}
for (i = 0; i < dvobj->iface_nums; i++) {
if (!(ifbmp & BIT(i)) || !dvobj->padapters)
if (!(ifbmp & BIT(i)) || &(dvobj->padapters) == NULL)
continue;
iface = dvobj->padapters[i];