summaryrefslogtreecommitdiff
path: root/package/kismet/patches/patch-iwcontrol_cc
blob: f6e8aac2526c2f19261162ec5d3420bc4c021ba5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
--- kismet-2010-01-R1.orig/iwcontrol.cc	Mon Aug 17 21:51:36 2009
+++ kismet-2010-01-R1/iwcontrol.cc	Wed Feb 17 21:59:02 2010
@@ -32,7 +32,6 @@
 #include <linux/if.h>
 #include <linux/wireless.h>
 
-#endif // wireless
 
 #ifndef rintf
 #define rintf(x) (float) rint((double) (x))
@@ -697,7 +696,7 @@ int Iwconfig_Get_Chanlist(const char *interface, char 
 		return -1;
 	}
 
-	bzero(buffer, sizeof(buffer));
+	memset(buffer, 0, sizeof(buffer));
 
 	memset(&wrq, 0, sizeof(struct iwreq));
 
@@ -732,7 +731,7 @@ int Iwconfig_Get_Chanlist(const char *interface, char 
 		memcpy((char *) &range, buffer, sizeof(iw_range));
 	} else {
 		/* Zero unknown fields */
-		bzero((char *) &range, sizeof(struct iw_range));
+		memset((char *) &range, 0, sizeof(struct iw_range));
 
 		/* Initial part unmoved */
 		memcpy((char *) &range, buffer, iwr15_off(num_channels));
@@ -797,6 +796,8 @@ int Iwconfig_Get_Chanlist(const char *interface, char 
 	close(skfd);
 	return chan_list->size();
 }
+
+#endif // wireless
 
 #endif