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
38
39
|
$Id: update-patches 24 2008-08-31 14:56:13Z wbx $
--- iptraf-3.0.0.orig/src/rvnamed.c 2005-09-13 08:42:54.000000000 +0200
+++ iptraf-3.0.0/src/rvnamed.c 2009-05-21 23:03:43.000000000 +0200
@@ -99,7 +99,7 @@ void process_rvn_packet(struct rvn *rvnp
if (he == NULL)
strcpy(rvnpacket->fqdn, inet_ntoa(rvnpacket->saddr));
else {
- bzero(rvnpacket->fqdn, 45);
+ memset(rvnpacket->fqdn, 0, 45);
strncpy(rvnpacket->fqdn, he->h_name, 44);
}
@@ -306,7 +306,7 @@ int main(void)
}
if (hi == lastfree) { /* Address not in cache */
- bzero(&(hostlist[hi]), sizeof(struct hosts));
+ memset(&(hostlist[hi]), 0, sizeof(struct hosts));
hi = hostindex;
hostindex++;
if (hostindex == NUM_CACHE_ENTRIES)
@@ -359,7 +359,7 @@ int main(void)
name_resolved(&rvnpacket, hostlist, lastfree);
if (readyidx >= 0) {
rvnpacket.type = RVN_REPLY;
- bzero(rvnpacket.fqdn, 45);
+ memset(rvnpacket.fqdn, 0, 45);
strncpy(rvnpacket.fqdn, hostlist[readyidx].fqdn,
44);
rvnpacket.ready = RESOLVED;
@@ -454,7 +454,7 @@ int main(void)
}
}
rvnpacket.type = RVN_REPLY;
- bzero(rvnpacket.fqdn, 45);
+ memset(rvnpacket.fqdn, 0, 45);
strcpy(rvnpacket.fqdn, inet_ntoa(rvnpacket.saddr));
rvnpacket.ready = RESOLVING;
|