From 3fd0b8f1963bc56c2789f3e7312ad9e6d31137fa Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 1 Nov 2008 13:02:50 +0200 Subject: [PATCH] Use os_snprintf() instead of snprintf() --- wpa_supplicant/ctrl_iface.c | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/wpa_supplicant/ctrl_iface.c b/wpa_supplicant/ctrl_iface.c index 036365dde..3170d541c 100644 --- a/wpa_supplicant/ctrl_iface.c +++ b/wpa_supplicant/ctrl_iface.c @@ -1269,32 +1269,32 @@ 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, - "bssid=" MACSTR "\n" - "freq=%d\n" - "beacon_int=%d\n" - "capabilities=0x%04x\n" - "qual=%d\n" - "noise=%d\n" - "level=%d\n" - "tsf=%016llu\n" - "ie=", - MAC2STR(bss->bssid), bss->freq, bss->beacon_int, - bss->caps, bss->qual, bss->noise, bss->level, - (unsigned long long) bss->tsf); + ret = os_snprintf(pos, end - pos, + "bssid=" MACSTR "\n" + "freq=%d\n" + "beacon_int=%d\n" + "capabilities=0x%04x\n" + "qual=%d\n" + "noise=%d\n" + "level=%d\n" + "tsf=%016llu\n" + "ie=", + MAC2STR(bss->bssid), bss->freq, bss->beacon_int, + bss->caps, bss->qual, bss->noise, bss->level, + (unsigned long long) bss->tsf); if (ret < 0 || ret >= end - pos) return pos - buf; pos += ret; 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;