summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnchal Jain <anchalj109@gmail.com>2016-09-18 07:48:56 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-09-18 10:36:39 (GMT)
commit70b9bb71fdf2da78341cdf70d3599c031d1e29fa (patch)
tree783e647bea97f04542eede0ed7d6d2c957c0161a
parent149ad082a2f4873daca28f57d59ec3deb47685ac (diff)
downloadlinux-70b9bb71fdf2da78341cdf70d3599c031d1e29fa.tar.xz
staging: rtl8188eu: core: Fix comparison to NULL
Convert pointer comparisons to NULL to NULL pointer 'p' Signed-off-by: Anchal Jain <anchalj109@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/staging/rtl8188eu/core/rtw_ap.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_ap.c b/drivers/staging/rtl8188eu/core/rtw_ap.c
index bf722e7..6662855 100644
--- a/drivers/staging/rtl8188eu/core/rtw_ap.c
+++ b/drivers/staging/rtl8188eu/core/rtw_ap.c
@@ -78,7 +78,7 @@ static void update_BCNTIM(struct adapter *padapter)
/* update TIM IE */
p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, _TIM_IE_, &tim_ielen,
pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_);
- if (p != NULL && tim_ielen > 0) {
+ if (p && tim_ielen > 0) {
tim_ielen += 2;
premainder_ie = p+tim_ielen;
tim_ie_offset = (int)(p - pie);
@@ -98,7 +98,7 @@ static void update_BCNTIM(struct adapter *padapter)
_SUPPORTEDRATES_IE_, &tmp_len,
(pnetwork_mlmeext->IELength -
_BEACON_IE_OFFSET_));
- if (p != NULL)
+ if (p)
offset += tmp_len+2;
/* DS Parameter Set IE, len = 3 */
@@ -183,7 +183,7 @@ void rtw_add_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
i += (pIE->Length + 2);
}
- if (p != NULL && ielen > 0) {
+ if (p && ielen > 0) {
ielen += 2;
premainder_ie = p+ielen;
@@ -232,7 +232,7 @@ void rtw_remove_bcn_ie(struct adapter *padapter, struct wlan_bssid_ex *pnetwork,
p = rtw_get_ie(pie + _FIXED_IE_LENGTH_, index, &ielen,
pnetwork->IELength - _FIXED_IE_LENGTH_);
- if (p != NULL && ielen > 0) {
+ if (p && ielen > 0) {
ielen += 2;
premainder_ie = p+ielen;
@@ -934,14 +934,14 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf, int len)
memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
/* get supported rates */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
- if (p != NULL) {
+ if (p) {
memcpy(supportRate, p+2, ie_len);
supportRateNum = ie_len;
}
/* get ext_supported rates */
p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _EXT_SUPPORTEDRATES_IE_, &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
- if (p != NULL) {
+ if (p) {
memcpy(supportRate+supportRateNum, p+2, ie_len);
supportRateNum += ie_len;
}