summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2009-08-10 00:38:02 +0000
committerJo-Philipp Wich <jow@openwrt.org>2009-08-10 00:38:02 +0000
commita85dd8ee6e2cfb83c0e602ec0f0b86e3a0b37298 (patch)
tree99a594238967b3180b294323f3b13a238216c998
parent1e4efd1355defe008bd29a2473b6b541e3e9c07b (diff)
libs/iwinfo: forgot to clear string buffer in wrapper function
-rw-r--r--libs/iwinfo/src/include/broadcom.h6
-rw-r--r--libs/iwinfo/src/include/madwifi.h3
-rw-r--r--libs/iwinfo/src/iwinfo_lualib.h1
3 files changed, 7 insertions, 3 deletions
diff --git a/libs/iwinfo/src/include/broadcom.h b/libs/iwinfo/src/include/broadcom.h
index 344c1206a..ad3b5ddb1 100644
--- a/libs/iwinfo/src/include/broadcom.h
+++ b/libs/iwinfo/src/include/broadcom.h
@@ -14,8 +14,8 @@
*
*/
-#ifndef _wlioctl_h_
-#define _wlioctl_h_
+#ifndef _BROADCOM_H
+#define _BROADCOM_H
#define WL_MCSSET_LEN 16
#define WL_MAX_STA_COUNT 32
@@ -73,4 +73,4 @@ typedef struct wl_ioctl {
uint32_t needed; /* bytes needed (optional) */
} wl_ioctl_t;
-#endif /* _wlioctl_h_ */
+#endif
diff --git a/libs/iwinfo/src/include/madwifi.h b/libs/iwinfo/src/include/madwifi.h
index c1eeca775..fd19dbf61 100644
--- a/libs/iwinfo/src/include/madwifi.h
+++ b/libs/iwinfo/src/include/madwifi.h
@@ -18,6 +18,8 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+#ifndef _MADWIFI_H
+#define _MADWIFI_H
/* ieee80211.h */
#define IEEE80211_ADDR_LEN 6
@@ -118,3 +120,4 @@ struct ieee80211req_sta_info {
u_int8_t isi_opmode; /* sta operating mode */
};
+#endif
diff --git a/libs/iwinfo/src/iwinfo_lualib.h b/libs/iwinfo/src/iwinfo_lualib.h
index 410a084f3..9840466f0 100644
--- a/libs/iwinfo/src/iwinfo_lualib.h
+++ b/libs/iwinfo/src/iwinfo_lualib.h
@@ -51,6 +51,7 @@
{ \
const char *ifname = luaL_checkstring(L, 1); \
char rv[IWINFO_BUFSIZE]; \
+ memset(rv, 0, IWINFO_BUFSIZE); \
if( !type##_get_##op(ifname, rv) ) \
lua_pushstring(L, rv); \
else \