Use os_snprintf() instead of snprintf()

This commit is contained in:
Jouni Malinen 2008-11-01 13:02:50 +02:00
parent 1add3c3387
commit 3fd0b8f196

View file

@ -1269,7 +1269,7 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
bss = results->res[i];
pos = buf;
end = buf + buflen;
ret = snprintf(pos, end - pos,
ret = os_snprintf(pos, end - pos,
"bssid=" MACSTR "\n"
"freq=%d\n"
"beacon_int=%d\n"
@ -1288,13 +1288,13 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
ie = (const u8 *) (bss + 1);
for (i = 0; i < bss->ie_len; i++) {
ret = snprintf(pos, end - pos, "%02x", *ie++);
ret = os_snprintf(pos, end - pos, "%02x", *ie++);
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
}
ret = snprintf(pos, end - pos, "\n");
ret = os_snprintf(pos, end - pos, "\n");
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;
@ -1323,7 +1323,7 @@ static int wpa_supplicant_ctrl_iface_bss(struct wpa_supplicant *wpa_s,
pos += ret;
}
ret = snprintf(pos, end - pos, "\n");
ret = os_snprintf(pos, end - pos, "\n");
if (ret < 0 || ret >= end - pos)
return pos - buf;
pos += ret;