aboutsummaryrefslogtreecommitdiffstats
path: root/src/eap_server/eap_server_psk.c
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-04-20 21:16:16 (GMT)
committerJouni Malinen <j@w1.fi>2020-04-21 14:39:07 (GMT)
commit60a2de56833c1de4eca57afe646bb23f079dd810 (patch)
treece088f6c09b7be56e800f00ecce0ebec7c5f6f02 /src/eap_server/eap_server_psk.c
parent4d2ec436e3ef249e47de6eac3e8e2d4aee077d68 (diff)
downloadhostap-60a2de56833c1de4eca57afe646bb23f079dd810.zip
hostap-60a2de56833c1de4eca57afe646bb23f079dd810.tar.gz
hostap-60a2de56833c1de4eca57afe646bb23f079dd810.tar.bz2
EAP server: Convert Boolean to C99 bool
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/eap_server/eap_server_psk.c')
-rw-r--r--src/eap_server/eap_server_psk.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/eap_server/eap_server_psk.c b/src/eap_server/eap_server_psk.c
index 511973c..f55f70d 100644
--- a/src/eap_server/eap_server_psk.c
+++ b/src/eap_server/eap_server_psk.c
@@ -171,8 +171,8 @@ static struct wpabuf * eap_psk_buildReq(struct eap_sm *sm, void *priv, u8 id)
}
-static Boolean eap_psk_check(struct eap_sm *sm, void *priv,
- struct wpabuf *respData)
+static bool eap_psk_check(struct eap_sm *sm, void *priv,
+ struct wpabuf *respData)
{
struct eap_psk_data *data = priv;
size_t len;
@@ -182,7 +182,7 @@ static Boolean eap_psk_check(struct eap_sm *sm, void *priv,
pos = eap_hdr_validate(EAP_VENDOR_IETF, EAP_TYPE_PSK, respData, &len);
if (pos == NULL || len < 1) {
wpa_printf(MSG_INFO, "EAP-PSK: Invalid frame");
- return TRUE;
+ return true;
}
t = EAP_PSK_FLAGS_GET_T(*pos);
@@ -191,22 +191,22 @@ static Boolean eap_psk_check(struct eap_sm *sm, void *priv,
if (data->state == PSK_1 && t != 1) {
wpa_printf(MSG_DEBUG, "EAP-PSK: Expected PSK-2 - "
"ignore T=%d", t);
- return TRUE;
+ return true;
}
if (data->state == PSK_3 && t != 3) {
wpa_printf(MSG_DEBUG, "EAP-PSK: Expected PSK-4 - "
"ignore T=%d", t);
- return TRUE;
+ return true;
}
if ((t == 1 && len < sizeof(struct eap_psk_hdr_2)) ||
(t == 3 && len < sizeof(struct eap_psk_hdr_4))) {
wpa_printf(MSG_DEBUG, "EAP-PSK: Too short frame");
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
@@ -433,7 +433,7 @@ static void eap_psk_process(struct eap_sm *sm, void *priv,
}
-static Boolean eap_psk_isDone(struct eap_sm *sm, void *priv)
+static bool eap_psk_isDone(struct eap_sm *sm, void *priv)
{
struct eap_psk_data *data = priv;
return data->state == SUCCESS || data->state == FAILURE;
@@ -474,7 +474,7 @@ static u8 * eap_psk_get_emsk(struct eap_sm *sm, void *priv, size_t *len)
}
-static Boolean eap_psk_isSuccess(struct eap_sm *sm, void *priv)
+static bool eap_psk_isSuccess(struct eap_sm *sm, void *priv)
{
struct eap_psk_data *data = priv;
return data->state == SUCCESS;