aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_peer/eap_fast.c
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2015-05-02 13:19:47 (GMT)
committerJouni Malinen <j@w1.fi>2015-05-03 13:32:19 (GMT)
commit8d9f3b8ed6fcf8f642a50218434db897944eadb8 (patch)
tree2951ffe8a89a01988e2bd46766427a2304942154 /src/eap_peer/eap_fast.c
parent07f9034d14234675f216d57334521d5e0518e2fb (diff)
downloadhostap-8d9f3b8ed6fcf8f642a50218434db897944eadb8.zip
hostap-8d9f3b8ed6fcf8f642a50218434db897944eadb8.tar.gz
hostap-8d9f3b8ed6fcf8f642a50218434db897944eadb8.tar.bz2
EAP-FAST: Do not use type cast to remove const specification
All the uses here are read only, so there is no need to type case the const specification away. Signed-off-by: Jouni Malinen <j@w1.fi>
Diffstat (limited to 'src/eap_peer/eap_fast.c')
-rw-r--r--src/eap_peer/eap_fast.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/eap_peer/eap_fast.c b/src/eap_peer/eap_fast.c
index 985aff2..baca3c7 100644
--- a/src/eap_peer/eap_fast.c
+++ b/src/eap_peer/eap_fast.c
@@ -1339,7 +1339,7 @@ continue_req:
static const u8 * eap_fast_get_a_id(const u8 *buf, size_t len, size_t *id_len)
{
const u8 *a_id;
- struct pac_tlv_hdr *hdr;
+ const struct pac_tlv_hdr *hdr;
/*
* Parse authority identity (A-ID) from the EAP-FAST/Start. This
@@ -1349,13 +1349,13 @@ static const u8 * eap_fast_get_a_id(const u8 *buf, size_t len, size_t *id_len)
*id_len = len;
if (len > sizeof(*hdr)) {
int tlen;
- hdr = (struct pac_tlv_hdr *) buf;
+ hdr = (const struct pac_tlv_hdr *) buf;
tlen = be_to_host16(hdr->len);
if (be_to_host16(hdr->type) == PAC_TYPE_A_ID &&
sizeof(*hdr) + tlen <= len) {
wpa_printf(MSG_DEBUG, "EAP-FAST: A-ID was in TLV "
"(Start)");
- a_id = (u8 *) (hdr + 1);
+ a_id = (const u8 *) (hdr + 1);
*id_len = tlen;
}
}