1
0

patch-src_rvnamed_c 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iptraf-3.0.0.orig/src/rvnamed.c 2005-09-13 08:42:54.000000000 +0200
  3. +++ iptraf-3.0.0/src/rvnamed.c 2009-05-21 23:03:43.000000000 +0200
  4. @@ -99,7 +99,7 @@ void process_rvn_packet(struct rvn *rvnp
  5. if (he == NULL)
  6. strcpy(rvnpacket->fqdn, inet_ntoa(rvnpacket->saddr));
  7. else {
  8. - bzero(rvnpacket->fqdn, 45);
  9. + memset(rvnpacket->fqdn, 0, 45);
  10. strncpy(rvnpacket->fqdn, he->h_name, 44);
  11. }
  12. @@ -306,7 +306,7 @@ int main(void)
  13. }
  14. if (hi == lastfree) { /* Address not in cache */
  15. - bzero(&(hostlist[hi]), sizeof(struct hosts));
  16. + memset(&(hostlist[hi]), 0, sizeof(struct hosts));
  17. hi = hostindex;
  18. hostindex++;
  19. if (hostindex == NUM_CACHE_ENTRIES)
  20. @@ -359,7 +359,7 @@ int main(void)
  21. name_resolved(&rvnpacket, hostlist, lastfree);
  22. if (readyidx >= 0) {
  23. rvnpacket.type = RVN_REPLY;
  24. - bzero(rvnpacket.fqdn, 45);
  25. + memset(rvnpacket.fqdn, 0, 45);
  26. strncpy(rvnpacket.fqdn, hostlist[readyidx].fqdn,
  27. 44);
  28. rvnpacket.ready = RESOLVED;
  29. @@ -454,7 +454,7 @@ int main(void)
  30. }
  31. }
  32. rvnpacket.type = RVN_REPLY;
  33. - bzero(rvnpacket.fqdn, 45);
  34. + memset(rvnpacket.fqdn, 0, 45);
  35. strcpy(rvnpacket.fqdn, inet_ntoa(rvnpacket.saddr));
  36. rvnpacket.ready = RESOLVING;