/* 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);
_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 */
i += (pIE->Length + 2);
}
- if (p != NULL && ielen > 0) {
+ if (p && ielen > 0) {
ielen += 2;
premainder_ie = p+ielen;
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;
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;
}