python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / wireless_tools / 0001-remove-bzero.patch
blob53ef5886756734e27db503c8c64e2d50fbc4174e
1 Switch all instances of deprecated bzero() to memset() equivalent.
3 Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
5 diff -Nura wireless_tools.30/ifrename.c wireless_tools.30-bzero/ifrename.c
6 --- wireless_tools.30/ifrename.c 2007-10-16 20:12:41.000000000 -0300
7 +++ wireless_tools.30-bzero/ifrename.c 2014-06-11 09:52:59.623741119 -0300
8 @@ -541,7 +541,7 @@
9 victimname, autoname);
11 /* Prepare request */
12 - bzero(&ifr, sizeof(struct ifreq));
13 + memset(&ifr, 0, sizeof(struct ifreq));
14 strncpy(ifr.ifr_name, victimname, IFNAMSIZ);
15 strncpy(ifr.ifr_newname, autoname, IFNAMSIZ);
17 @@ -587,7 +587,7 @@
20 /* Prepare request */
21 - bzero(&ifr, sizeof(struct ifreq));
22 + memset(&ifr, 0, sizeof(struct ifreq));
23 strncpy(ifr.ifr_name, oldname, IFNAMSIZ);
24 strncpy(ifr.ifr_newname, newname, IFNAMSIZ);
26 @@ -747,7 +747,7 @@
27 int i;
29 /* Get MAC address */
30 - bzero(&ifr, sizeof(struct ifreq));
31 + memset(&ifr, 0, sizeof(struct ifreq));
32 strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
33 ret = ioctl(skfd, SIOCGIFHWADDR, &ifr);
34 if(ret < 0)
35 @@ -1040,8 +1040,8 @@
36 return(0);
38 /* Prepare request */
39 - bzero(&ifr, sizeof(struct ifreq));
40 - bzero(&drvinfo, sizeof(struct ethtool_drvinfo));
41 + memset(&ifr, 0, sizeof(struct ifreq));
42 + memset(&drvinfo, 0, sizeof(struct ethtool_drvinfo));
43 strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
44 drvinfo.cmd = ETHTOOL_GDRVINFO;
45 ifr.ifr_data = (caddr_t) &drvinfo;
46 @@ -1206,8 +1206,8 @@
47 return(0);
49 /* Prepare request */
50 - bzero(&ifr, sizeof(struct ifreq));
51 - bzero(&map, sizeof(struct ifmap));
52 + memset(&ifr, 0, sizeof(struct ifreq));
53 + memset(&map, 0, sizeof(struct ifmap));
54 strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
56 /* Do it */
57 @@ -2050,7 +2050,7 @@
58 struct add_extra extrainfo;
60 /* Reset the list of filters */
61 - bzero(selector_active, sizeof(selector_active));
62 + memset(selector_active, 0, sizeof(selector_active));
64 /* Check filename */
65 if(!strcmp(filename, "-"))
66 diff -Nura wireless_tools.30/iwlib.c wireless_tools.30-bzero/iwlib.c
67 --- wireless_tools.30/iwlib.c 2009-11-23 23:28:59.000000000 -0300
68 +++ wireless_tools.30-bzero/iwlib.c 2014-06-11 09:50:20.611371384 -0300
69 @@ -484,7 +484,7 @@
70 union iw_range_raw * range_raw;
72 /* Cleanup */
73 - bzero(buffer, sizeof(buffer));
74 + memset(buffer, 0, sizeof(buffer));
76 wrq.u.data.pointer = (caddr_t) buffer;
77 wrq.u.data.length = sizeof(buffer);
78 @@ -513,7 +513,7 @@
79 else
81 /* Zero unknown fields */
82 - bzero((char *) range, sizeof(struct iw_range));
83 + memset((char *) range, 0, sizeof(struct iw_range));
85 /* Initial part unmoved */
86 memcpy((char *) range,
87 @@ -3064,7 +3064,7 @@
88 oldwscan->next = wscan;
90 /* Reset it */
91 - bzero(wscan, sizeof(struct wireless_scan));
92 + memset(wscan, 0, sizeof(struct wireless_scan));
94 /* Save cell identifier */
95 wscan->has_ap_addr = 1;