aboutsummaryrefslogtreecommitdiffstats
path: root/hostapd/hlr_auc_gw.c
diff options
context:
space:
mode:
Diffstat (limited to 'hostapd/hlr_auc_gw.c')
-rw-r--r--hostapd/hlr_auc_gw.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hostapd/hlr_auc_gw.c b/hostapd/hlr_auc_gw.c
index c041887..42d59db 100644
--- a/hostapd/hlr_auc_gw.c
+++ b/hostapd/hlr_auc_gw.c
@@ -711,7 +711,7 @@ static int gsm_auth_req(char *imsi, char *resp, size_t resp_len)
rend = resp + resp_len;
rpos = resp;
ret = os_snprintf(rpos, rend - rpos, "GSM-AUTH-RESP %s", imsi);
- if (ret < 0 || ret >= rend - rpos)
+ if (os_snprintf_error(rend - rpos, ret))
return -1;
rpos += ret;
@@ -737,7 +737,7 @@ static int gsm_auth_req(char *imsi, char *resp, size_t resp_len)
printf("No GSM triplets found for %s\n", imsi);
ret = os_snprintf(rpos, rend - rpos, " FAILURE");
- if (ret < 0 || ret >= rend - rpos)
+ if (os_snprintf_error(rend - rpos, ret))
return -1;
rpos += ret;