X-Git-Url: https://git.tcpdump.org/libpcap/blobdiff_plain/81a96c3226964543ab7a0cb27948793e7882a6f7..1eb25ea82a2d573e7596c936f91f73c17f5d0c5a:/pcap-linux.c diff --git a/pcap-linux.c b/pcap-linux.c index 4e1a22ee..f78c33d8 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 == ':') { /*