1
0

patch-src_landesc_c 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- iptraf-3.0.0.orig/src/landesc.c 2005-09-13 08:42:54.000000000 +0200
  3. +++ iptraf-3.0.0/src/landesc.c 2009-05-21 23:01:53.000000000 +0200
  4. @@ -79,12 +79,10 @@ void loaddesclist(struct desclist *list,
  5. char etherline[140];
  6. int i, j; /* counters used when parsing /etc/ethers */
  7. - bzero(list, sizeof(struct desclist));
  8. + memset(list, 0, sizeof(struct desclist));
  9. if (linktype == LINK_ETHERNET)
  10. fd = fopen(ETHFILE, "r");
  11. - else if (linktype == LINK_FDDI)
  12. - fd = fopen(FDDIFILE, "r");
  13. if (fd == NULL) {
  14. return;
  15. @@ -95,8 +93,8 @@ void loaddesclist(struct desclist *list,
  16. printnomem();
  17. return;
  18. }
  19. - bzero(ptmp, sizeof(struct desclistent));
  20. - bzero(descline, 140);
  21. + memset(ptmp, 0, sizeof(struct desclistent));
  22. + memset(descline, 0, 140);
  23. fgets(descline, 140, fd);
  24. if (strcmp(descline, "") == 0) {
  25. @@ -145,9 +143,9 @@ void loaddesclist(struct desclist *list,
  26. printnomem();
  27. return;
  28. }
  29. - bzero(ptmp, sizeof(struct desclistent));
  30. - bzero(descline, 140);
  31. - bzero(etherline, 140);
  32. + memset(ptmp, 0, sizeof(struct desclistent));
  33. + memset(descline, 0, 140);
  34. + memset(etherline, 0, 140);
  35. fgets(etherline, 140, fd);
  36. /*
  37. @@ -205,8 +203,6 @@ void savedesclist(struct desclist *list,
  38. if (linktype == LINK_ETHERNET)
  39. fd = fopen(ETHFILE, "w");
  40. - else if (linktype == LINK_FDDI)
  41. - fd = fopen(FDDIFILE, "w");
  42. if (fd < 0) {
  43. etherr();