aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--hostapd/driver_prism54.c14
-rw-r--r--hostapd/eap_aka.c5
-rw-r--r--hostapd/eap_peap.c5
-rw-r--r--hostapd/eap_sim.c5
-rw-r--r--hostapd/eap_tls.c5
-rw-r--r--hostapd/eap_tlv.c7
-rw-r--r--hostapd/eap_ttls.c8
-rw-r--r--hostapd/ieee802_11h.c6
-rw-r--r--hostapd/ieee802_11h.h13
-rw-r--r--hostapd/reconfig.c19
-rw-r--r--hostapd/wme.c5
-rw-r--r--hostapd/wpa.c5
-rw-r--r--wpa_supplicant/driver_atmel.c9
-rw-r--r--wpa_supplicant/driver_wext.c5
-rw-r--r--wpa_supplicant/pcsc_funcs.c4
-rw-r--r--wpa_supplicant/wpa_ctrl.c5
16 files changed, 59 insertions, 61 deletions
diff --git a/hostapd/driver_prism54.c b/hostapd/driver_prism54.c
index e3eb8c9..d1485f1 100644
--- a/hostapd/driver_prism54.c
+++ b/hostapd/driver_prism54.c
@@ -2,6 +2,7 @@
* hostapd / Driver interaction with Prism54 PIMFOR interface
* Copyright (c) 2004, Bell Kin <bell_kin@pek.com.tw>
* based on hostap driver.c, ieee802_11.c
+ * Copyright (c) 2002-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -169,7 +170,7 @@ static int prism54_set_sta_authorized(void *priv, const u8 *addr,
struct prism54_driver_data *drv = priv;
pimdev_hdr *hdr;
char *pos;
- int res;
+
hdr = malloc(sizeof(*hdr) + ETH_ALEN);
if (hdr == NULL)
return -1;
@@ -181,7 +182,7 @@ static int prism54_set_sta_authorized(void *priv, const u8 *addr,
}
pos = (char *) (hdr + 1);
memcpy(pos, addr, ETH_ALEN);
- res = send(drv->pim_sock, hdr, sizeof(*hdr) + ETH_ALEN, 0);
+ send(drv->pim_sock, hdr, sizeof(*hdr) + ETH_ALEN, 0);
prism54_waitpim(priv, hdr->oid, hdr, sizeof(*hdr) + ETH_ALEN, 10);
free(hdr);
return 0;
@@ -313,7 +314,6 @@ static int prism54_init_1x(void *priv)
struct prism54_driver_data *drv = priv;
pimdev_hdr *hdr;
unsigned long *ul;
- int ret;
int blen = sizeof(*hdr) + sizeof(*ul);
hdr = malloc(blen);
@@ -324,22 +324,22 @@ static int prism54_init_1x(void *priv)
hdr->op = htonl(PIMOP_SET);
hdr->oid = htonl(DOT11_OID_EXUNENCRYPTED);
*ul = htonl(DOT11_BOOL_TRUE); /* not accept */
- ret = send(drv->pim_sock, hdr, blen, 0);
+ send(drv->pim_sock, hdr, blen, 0);
prism54_waitpim(priv, DOT11_OID_EXUNENCRYPTED, hdr, blen, 10);
hdr->op = htonl(PIMOP_SET);
hdr->oid = htonl(DOT11_OID_MLMEAUTOLEVEL);
*ul = htonl(DOT11_MLME_EXTENDED);
- ret = send(drv->pim_sock, hdr, blen, 0);
+ send(drv->pim_sock, hdr, blen, 0);
prism54_waitpim(priv, DOT11_OID_MLMEAUTOLEVEL, hdr, blen, 10);
hdr->op = htonl(PIMOP_SET);
hdr->oid = htonl(DOT11_OID_DOT1XENABLE);
*ul = htonl(DOT11_BOOL_TRUE);
- ret = send(drv->pim_sock, hdr, blen, 0);
+ send(drv->pim_sock, hdr, blen, 0);
prism54_waitpim(priv, DOT11_OID_DOT1XENABLE, hdr, blen, 10);
hdr->op = htonl(PIMOP_SET);
hdr->oid = htonl(DOT11_OID_AUTHENABLE);
*ul = htonl(DOT11_AUTH_OS); /* OS */
- ret = send(drv->pim_sock, hdr, blen, 0);
+ send(drv->pim_sock, hdr, blen, 0);
prism54_waitpim(priv, DOT11_OID_AUTHENABLE, hdr, blen, 10);
free(hdr);
return 0;
diff --git a/hostapd/eap_aka.c b/hostapd/eap_aka.c
index 830ed20..379f61c 100644
--- a/hostapd/eap_aka.c
+++ b/hostapd/eap_aka.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-AKA (RFC 4187)
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2005-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -271,12 +271,11 @@ static Boolean eap_aka_check(struct eap_sm *sm, void *priv,
struct eap_aka_data *data = priv;
struct eap_hdr *resp;
u8 *pos, subtype;
- size_t len;
resp = (struct eap_hdr *) respData;
pos = (u8 *) (resp + 1);
if (respDataLen < sizeof(*resp) + 4 || *pos != EAP_TYPE_AKA ||
- (len = ntohs(resp->length)) > respDataLen) {
+ (ntohs(resp->length)) > respDataLen) {
wpa_printf(MSG_INFO, "EAP-AKA: Invalid frame");
return TRUE;
}
diff --git a/hostapd/eap_peap.c b/hostapd/eap_peap.c
index e2773ec..24f9917 100644
--- a/hostapd/eap_peap.c
+++ b/hostapd/eap_peap.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-PEAP (draft-josefsson-pppext-eap-tls-eap-07.txt)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -338,12 +338,11 @@ static Boolean eap_peap_check(struct eap_sm *sm, void *priv,
{
struct eap_hdr *resp;
u8 *pos;
- size_t len;
resp = (struct eap_hdr *) respData;
pos = (u8 *) (resp + 1);
if (respDataLen < sizeof(*resp) + 2 || *pos != EAP_TYPE_PEAP ||
- (len = ntohs(resp->length)) > respDataLen) {
+ (ntohs(resp->length)) > respDataLen) {
wpa_printf(MSG_INFO, "EAP-PEAP: Invalid frame");
return TRUE;
}
diff --git a/hostapd/eap_sim.c b/hostapd/eap_sim.c
index e4b4187..175c8e5 100644
--- a/hostapd/eap_sim.c
+++ b/hostapd/eap_sim.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-SIM (RFC 4186)
- * Copyright (c) 2005-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2005-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -267,12 +267,11 @@ static Boolean eap_sim_check(struct eap_sm *sm, void *priv,
struct eap_sim_data *data = priv;
struct eap_hdr *resp;
u8 *pos, subtype;
- size_t len;
resp = (struct eap_hdr *) respData;
pos = (u8 *) (resp + 1);
if (respDataLen < sizeof(*resp) + 4 || *pos != EAP_TYPE_SIM ||
- (len = ntohs(resp->length)) > respDataLen) {
+ (ntohs(resp->length)) > respDataLen) {
wpa_printf(MSG_INFO, "EAP-SIM: Invalid frame");
return TRUE;
}
diff --git a/hostapd/eap_tls.c b/hostapd/eap_tls.c
index 8f8f2f3..2dbffaf 100644
--- a/hostapd/eap_tls.c
+++ b/hostapd/eap_tls.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-TLS (RFC 2716)
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -130,12 +130,11 @@ static Boolean eap_tls_check(struct eap_sm *sm, void *priv,
{
struct eap_hdr *resp;
u8 *pos;
- size_t len;
resp = (struct eap_hdr *) respData;
pos = (u8 *) (resp + 1);
if (respDataLen < sizeof(*resp) + 2 || *pos != EAP_TYPE_TLS ||
- (len = ntohs(resp->length)) > respDataLen) {
+ (ntohs(resp->length)) > respDataLen) {
wpa_printf(MSG_INFO, "EAP-TLS: Invalid frame");
return TRUE;
}
diff --git a/hostapd/eap_tlv.c b/hostapd/eap_tlv.c
index af8c2c8..5672c11 100644
--- a/hostapd/eap_tlv.c
+++ b/hostapd/eap_tlv.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-TLV (draft-josefsson-pppext-eap-tls-eap-07.txt)
- * Copyright (c) 2004, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -97,12 +97,11 @@ static Boolean eap_tlv_check(struct eap_sm *sm, void *priv,
{
struct eap_hdr *resp;
u8 *pos;
- size_t len;
resp = (struct eap_hdr *) respData;
pos = (u8 *) (resp + 1);
if (respDataLen < sizeof(*resp) + 1 || *pos != EAP_TYPE_TLV ||
- (len = ntohs(resp->length)) > respDataLen) {
+ (ntohs(resp->length)) > respDataLen) {
wpa_printf(MSG_INFO, "EAP-TLV: Invalid frame");
return TRUE;
}
@@ -117,14 +116,12 @@ static void eap_tlv_process(struct eap_sm *sm, void *priv,
struct eap_tlv_data *data = priv;
struct eap_hdr *resp;
u8 *pos;
- int len;
size_t left;
u8 *result_tlv = NULL;
size_t result_tlv_len = 0;
int tlv_type, mandatory, tlv_len;
resp = (struct eap_hdr *) respData;
- len = ntohs(resp->length);
pos = (u8 *) (resp + 1);
/* Parse TLVs */
diff --git a/hostapd/eap_ttls.c b/hostapd/eap_ttls.c
index 4bb3a34..cdd6283 100644
--- a/hostapd/eap_ttls.c
+++ b/hostapd/eap_ttls.c
@@ -1,6 +1,6 @@
/*
* hostapd / EAP-TTLS (draft-ietf-pppext-eap-ttls-05.txt)
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -652,12 +652,11 @@ static Boolean eap_ttls_check(struct eap_sm *sm, void *priv,
{
struct eap_hdr *resp;
u8 *pos;
- size_t len;
resp = (struct eap_hdr *) respData;
pos = (u8 *) (resp + 1);
if (respDataLen < sizeof(*resp) + 2 || *pos != EAP_TYPE_TTLS ||
- (len = ntohs(resp->length)) > respDataLen) {
+ (ntohs(resp->length)) > respDataLen) {
wpa_printf(MSG_INFO, "EAP-TTLS: Invalid frame");
return TRUE;
}
@@ -866,7 +865,7 @@ static void eap_ttls_process_phase2_mschapv2(struct eap_sm *sm,
size_t challenge_len,
u8 *response, size_t response_len)
{
- u8 *chal, *username, nt_response[24], *pos, *rx_resp, *peer_challenge,
+ u8 *chal, *username, nt_response[24], *rx_resp, *peer_challenge,
*auth_challenge;
size_t username_len, i;
@@ -895,7 +894,6 @@ static void eap_ttls_process_phase2_mschapv2(struct eap_sm *sm,
* (if present). */
username = sm->identity;
username_len = sm->identity_len;
- pos = username;
for (i = 0; i < username_len; i++) {
if (username[i] == '\\') {
username_len -= i + 1;
diff --git a/hostapd/ieee802_11h.c b/hostapd/ieee802_11h.c
index 926a046..e1777bc 100644
--- a/hostapd/ieee802_11h.c
+++ b/hostapd/ieee802_11h.c
@@ -1,6 +1,7 @@
/*
* hostapd / IEEE 802.11h
- * Copyright 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -19,14 +20,13 @@
int hostapd_check_power_cap(struct hostapd_data *hapd, u8 *power, u8 len)
{
- unsigned int min_pwr, max_pwr;
+ unsigned int max_pwr;
if (len < 2) {
HOSTAPD_DEBUG(HOSTAPD_DEBUG_MINIMAL,
"Too short power capability IE\n");
return -1;
}
- min_pwr = power[0];
max_pwr = power[1];
if (max_pwr > hapd->iface->sta_max_power)
return -1;
diff --git a/hostapd/ieee802_11h.h b/hostapd/ieee802_11h.h
index 584540e..796c504 100644
--- a/hostapd/ieee802_11h.h
+++ b/hostapd/ieee802_11h.h
@@ -1,7 +1,16 @@
/*
* hostapd / IEEE 802.11h
- * Copyright 2005-2006, Devicescape Software, Inc.
- * All Rights Reserved.
+ * Copyright (c) 2005-2006, Devicescape Software, Inc.
+ * Copyright (c) 2007, Jouni Malinen <jkmaline@cc.hut.fi>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
*/
#ifndef IEEE802_11H_H
diff --git a/hostapd/reconfig.c b/hostapd/reconfig.c
index a799ad9..9a3cfe2 100644
--- a/hostapd/reconfig.c
+++ b/hostapd/reconfig.c
@@ -1,9 +1,17 @@
/*
* hostapd / Configuration reloading
- * Copyright 2002-2003, Jouni Malinen <jkmaline@cc.hut.fi>
- * Copyright 2002-2004, Instant802 Networks, Inc.
- * Copyright 2005-2006, Devicescape Software, Inc.
- * All Rights Reserved.
+ * Copyright (c) 2002-2007, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2002-2004, Instant802 Networks, Inc.
+ * Copyright (c) 2005-2006, Devicescape Software, Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Alternatively, this software may be distributed under the terms of BSD
+ * license.
+ *
+ * See README and COPYING for more details.
*/
#include "includes.h"
@@ -49,13 +57,10 @@ static int hostapd_config_reload_sta(struct hostapd_data *hapd,
struct sta_info *sta, void *data)
{
struct hostapd_config_change *change = data;
- struct hostapd_config *newconf, *oldconf;
struct hostapd_bss_config *newbss, *oldbss;
int deauth = 0;
u8 reason = WLAN_REASON_PREV_AUTH_NOT_VALID;
- newconf = change->newconf;
- oldconf = change->oldconf;
newbss = change->newbss;
oldbss = change->oldbss;
hapd = change->hapd;
diff --git a/hostapd/wme.c b/hostapd/wme.c
index b29383f..8be740f 100644
--- a/hostapd/wme.c
+++ b/hostapd/wme.c
@@ -77,8 +77,6 @@ u8 * hostapd_eid_wme(struct hostapd_data *hapd, u8 *eid)
int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
{
struct wme_information_element *wme;
- u8 *pos;
- size_t left;
wpa_hexdump(MSG_MSGDUMP, "WME IE", eid, len);
@@ -101,9 +99,6 @@ int hostapd_eid_wme_valid(struct hostapd_data *hapd, u8 *eid, size_t len)
return -1;
}
- pos = (u8 *) (wme + 1);
- left = len - sizeof(*wme);
-
return 0;
}
diff --git a/hostapd/wpa.c b/hostapd/wpa.c
index 7b5d2e3..c2987ca 100644
--- a/hostapd/wpa.c
+++ b/hostapd/wpa.c
@@ -1,6 +1,6 @@
/*
* hostapd - IEEE 802.11i-2004 / WPA Authenticator
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -1052,7 +1052,7 @@ static int wpa_verify_key_mic(struct wpa_ptk *PTK, u8 *data, size_t data_len)
struct ieee802_1x_hdr *hdr;
struct wpa_eapol_key *key;
u16 key_info;
- int type, ret = 0;
+ int ret = 0;
u8 mic[16];
if (data_len < sizeof(*hdr) + sizeof(*key))
@@ -1061,7 +1061,6 @@ static int wpa_verify_key_mic(struct wpa_ptk *PTK, u8 *data, size_t data_len)
hdr = (struct ieee802_1x_hdr *) data;
key = (struct wpa_eapol_key *) (hdr + 1);
key_info = WPA_GET_BE16(key->key_info);
- type = key_info & WPA_KEY_INFO_TYPE_MASK;
memcpy(mic, key->key_mic, 16);
memset(key->key_mic, 0, 16);
if (wpa_eapol_key_mic(PTK->kck, key_info & WPA_KEY_INFO_TYPE_MASK,
diff --git a/wpa_supplicant/driver_atmel.c b/wpa_supplicant/driver_atmel.c
index f5d1c30..588565e 100644
--- a/wpa_supplicant/driver_atmel.c
+++ b/wpa_supplicant/driver_atmel.c
@@ -1,7 +1,7 @@
/*
* WPA Supplicant - Driver interaction with Atmel Wireless LAN drivers
* Copyright (c) 2000-2005, ATMEL Corporation
- * Copyright (c) 2004-2005, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -345,6 +345,7 @@ static int wpa_driver_atmel_disassociate(void *priv, const u8 *addr,
}
+#if 0
/* Atmel driver uses specific values for each cipher suite */
static int convertSuiteToDriver(wpa_cipher suite)
{
@@ -373,6 +374,7 @@ static int convertSuiteToDriver(wpa_cipher suite)
return suite_type;
}
+#endif
static int
wpa_driver_atmel_associate(void *priv,
@@ -380,16 +382,15 @@ wpa_driver_atmel_associate(void *priv,
{
struct wpa_driver_atmel_data *drv = priv;
int ret = 0;
+#if 0
u8 pairwise_suite_driver;
u8 group_suite_driver;
u8 key_mgmt_suite_driver;
-
pairwise_suite_driver = convertSuiteToDriver(params->pairwise_suite);
group_suite_driver = convertSuiteToDriver(params->group_suite);
key_mgmt_suite_driver = convertSuiteToDriver(params->key_mgmt_suite);
-
-#if 0
+
if (wpa_driver_atmel_set_suites(drv, pairwise_suite_driver,
group_suite_driver,
key_mgmt_suite_driver) < 0){
diff --git a/wpa_supplicant/driver_wext.c b/wpa_supplicant/driver_wext.c
index 77913b0..332a226 100644
--- a/wpa_supplicant/driver_wext.c
+++ b/wpa_supplicant/driver_wext.c
@@ -1,6 +1,6 @@
/*
* WPA Supplicant - driver interaction with generic Linux Wireless Extensions
- * Copyright (c) 2003-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2003-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -2233,7 +2233,8 @@ wpa_driver_wext_get_hw_feature_data(void *priv, u16 *num_modes, u16 *flags)
feature->channels = os_malloc(clen);
feature->rates = os_malloc(rlen);
- if (!feature->channels || !feature->rates) {
+ if (!feature->channels || !feature->rates ||
+ pos + clen + rlen > end) {
ieee80211_sta_free_hw_features(modes, *num_modes);
modes = NULL;
break;
diff --git a/wpa_supplicant/pcsc_funcs.c b/wpa_supplicant/pcsc_funcs.c
index 623e147..3cb9745 100644
--- a/wpa_supplicant/pcsc_funcs.c
+++ b/wpa_supplicant/pcsc_funcs.c
@@ -1,6 +1,6 @@
/*
* WPA Supplicant / PC/SC smartcard interface for USIM, GSM SIM
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -1141,7 +1141,6 @@ int scard_umts_auth(struct scard_data *scard, const unsigned char *_rand,
{
unsigned char cmd[5 + 1 + AKA_RAND_LEN + 1 + AKA_AUTN_LEN] =
{ USIM_CMD_RUN_UMTS_ALG };
- int cmdlen;
unsigned char get_resp[5] = { USIM_CMD_GET_RESPONSE };
unsigned char resp[3], buf[64], *pos, *end;
size_t len;
@@ -1158,7 +1157,6 @@ int scard_umts_auth(struct scard_data *scard, const unsigned char *_rand,
wpa_hexdump(MSG_DEBUG, "SCARD: UMTS auth - RAND", _rand, AKA_RAND_LEN);
wpa_hexdump(MSG_DEBUG, "SCARD: UMTS auth - AUTN", autn, AKA_AUTN_LEN);
- cmdlen = 5 + 1 + AKA_RAND_LEN + 1 + AKA_AUTN_LEN;
cmd[5] = AKA_RAND_LEN;
os_memcpy(cmd + 6, _rand, AKA_RAND_LEN);
cmd[6 + AKA_RAND_LEN] = AKA_AUTN_LEN;
diff --git a/wpa_supplicant/wpa_ctrl.c b/wpa_supplicant/wpa_ctrl.c
index 9894ce8..1dc677f 100644
--- a/wpa_supplicant/wpa_ctrl.c
+++ b/wpa_supplicant/wpa_ctrl.c
@@ -1,6 +1,6 @@
/*
* wpa_supplicant/hostapd control interface library
- * Copyright (c) 2004-2006, Jouni Malinen <jkmaline@cc.hut.fi>
+ * Copyright (c) 2004-2007, Jouni Malinen <jkmaline@cc.hut.fi>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -300,13 +300,12 @@ int wpa_ctrl_recv(struct wpa_ctrl *ctrl, char *reply, size_t *reply_len)
int wpa_ctrl_pending(struct wpa_ctrl *ctrl)
{
struct timeval tv;
- int res;
fd_set rfds;
tv.tv_sec = 0;
tv.tv_usec = 0;
FD_ZERO(&rfds);
FD_SET(ctrl->s, &rfds);
- res = select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
+ select(ctrl->s + 1, &rfds, NULL, NULL, &tv);
return FD_ISSET(ctrl->s, &rfds);
}