aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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 == ':') {
/*