DPP: Remove compiler warnings about signed/unsigned comparisons

These timestamp comparisons did not use matching signedness.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
Jouni Malinen 2017-11-23 20:24:37 +02:00 committed by Jouni Malinen
parent 116454f460
commit 3ca4be1eaa
2 changed files with 3 additions and 3 deletions

View file

@ -1065,7 +1065,7 @@ static void hostapd_dpp_rx_peer_disc_req(struct hostapd_data *hapd,
os_get_time(&now);
if (hapd->conf->dpp_netaccesskey_expiry &&
hapd->conf->dpp_netaccesskey_expiry < now.sec) {
(os_time_t) hapd->conf->dpp_netaccesskey_expiry < now.sec) {
wpa_printf(MSG_INFO, "DPP: Own netAccessKey expired");
return;
}
@ -1106,7 +1106,7 @@ static void hostapd_dpp_rx_peer_disc_req(struct hostapd_data *hapd,
return;
}
if (!expire || hapd->conf->dpp_netaccesskey_expiry < expire)
if (!expire || (os_time_t) hapd->conf->dpp_netaccesskey_expiry < expire)
expire = hapd->conf->dpp_netaccesskey_expiry;
if (expire)
expiration = expire - now.sec;

View file

@ -2235,7 +2235,7 @@ int wpas_dpp_check_connect(struct wpa_supplicant *wpa_s, struct wpa_ssid *ssid,
os_get_time(&now);
if (ssid->dpp_netaccesskey_expiry &&
ssid->dpp_netaccesskey_expiry < now.sec) {
(os_time_t) ssid->dpp_netaccesskey_expiry < now.sec) {
wpa_msg(wpa_s, MSG_INFO, DPP_EVENT_MISSING_CONNECTOR
"netAccessKey expired");
return -1;