From: Eytan Lifshitz Date: Mon, 10 Feb 2014 10:55:06 +0000 (+0200) Subject: Remove unnecessary NULL check X-Git-Tag: hostap_2_2~869 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93a1caece06026a65bcc76fdc273f2d005f7a443;p=thirdparty%2Fhostap.git Remove unnecessary NULL check In send_assoc_resp(), sta was checked for NULL, although it can't be NULL. Signed-hostap: Eytan Lifshitz --- diff --git a/src/ap/ieee802_11.c b/src/ap/ieee802_11.c index 4626ec471..c755265c8 100644 --- a/src/ap/ieee802_11.c +++ b/src/ap/ieee802_11.c @@ -1129,8 +1129,7 @@ static void send_assoc_resp(struct hostapd_data *hapd, struct sta_info *sta, reply->u.assoc_resp.capab_info = host_to_le16(hostapd_own_capab_info(hapd, sta, 0)); reply->u.assoc_resp.status_code = host_to_le16(status_code); - reply->u.assoc_resp.aid = host_to_le16((sta ? sta->aid : 0) - | BIT(14) | BIT(15)); + reply->u.assoc_resp.aid = host_to_le16(sta->aid | BIT(14) | BIT(15)); /* Supported rates */ p = hostapd_eid_supp_rates(hapd, reply->u.assoc_resp.variable); /* Extended supported rates */