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
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);
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);
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);
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;
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);
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));
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
70 union iw_range_raw * range_raw;
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);
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,
88 oldwscan->next = wscan;
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;