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,
6 int i, j; /* counters used when parsing /etc/ethers */
8 - bzero(list, sizeof(struct desclist));
9 + memset(list, 0, sizeof(struct desclist));
11 if (linktype == LINK_ETHERNET)
12 fd = fopen(ETHFILE, "r");
13 - else if (linktype == LINK_FDDI)
14 - fd = fopen(FDDIFILE, "r");
18 @@ -95,8 +93,8 @@ void loaddesclist(struct desclist *list,
22 - bzero(ptmp, sizeof(struct desclistent));
23 - bzero(descline, 140);
24 + memset(ptmp, 0, sizeof(struct desclistent));
25 + memset(descline, 0, 140);
26 fgets(descline, 140, fd);
28 if (strcmp(descline, "") == 0) {
29 @@ -145,9 +143,9 @@ void loaddesclist(struct desclist *list,
33 - bzero(ptmp, sizeof(struct desclistent));
34 - bzero(descline, 140);
35 - bzero(etherline, 140);
36 + memset(ptmp, 0, sizeof(struct desclistent));
37 + memset(descline, 0, 140);
38 + memset(etherline, 0, 140);
39 fgets(etherline, 140, fd);
42 @@ -205,8 +203,6 @@ void savedesclist(struct desclist *list,
44 if (linktype == LINK_ETHERNET)
45 fd = fopen(ETHFILE, "w");
46 - else if (linktype == LINK_FDDI)
47 - fd = fopen(FDDIFILE, "w");