aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2010-01-10 10:59:22 -0800
committerGuy Harris <guy@alum.mit.edu>2010-01-10 10:59:22 -0800
commit1eb25ea82a2d573e7596c936f91f73c17f5d0c5a (patch)
tree3198981fec8c4871cfadd993438cf424a33a8f51
parent81a96c3226964543ab7a0cb27948793e7882a6f7 (diff)
Fix some errors in the previous checkin.
-rw-r--r--pcap-linux.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/pcap-linux.c b/pcap-linux.c
index 4e1a22e..f78c33d 100644
--- a/pcap-linux.c
+++ b/pcap-linux.c
@@ -1796,8 +1796,6 @@ scan_sys_class_net(pcap_if_t **devlistp, char *errbuf)
DIR *sys_class_net_d;
int fd;
struct dirent *ent;
- char linebuf[512];
- int linenum;
char *p;
char name[512]; /* XXX - pick a size */
char *q, *saveq;
@@ -1831,7 +1829,8 @@ scan_sys_class_net(pcap_if_t **devlistp, char *errbuf)
/*
* Get the interface name.
*/
- q = &ent->d_name[0];
+ p = &ent->d_name[0];
+ q = &name[0];
while (*p != '\0' && isascii(*p) && !isspace(*p)) {
if (*p == ':') {
/*