aboutsummaryrefslogtreecommitdiffstats
path: root/src/ap/wps_hostapd.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ap/wps_hostapd.c')
-rw-r--r--src/ap/wps_hostapd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ap/wps_hostapd.c b/src/ap/wps_hostapd.c
index 69434c8..9ba7aba 100644
--- a/src/ap/wps_hostapd.c
+++ b/src/ap/wps_hostapd.c
@@ -1583,7 +1583,7 @@ int hostapd_wps_ap_pin_set(struct hostapd_data *hapd, const char *pin,
int ret;
ret = os_snprintf(data.pin_txt, sizeof(data.pin_txt), "%s", pin);
- if (ret < 0 || ret >= (int) sizeof(data.pin_txt))
+ if (os_snprintf_error(sizeof(data.pin_txt), ret))
return -1;
data.timeout = timeout;
return hostapd_wps_for_each(hapd, wps_ap_pin_set, &data);