]> The Tcpdump Group git mirrors - libpcap/blobdiff - pcap-linux.c
Fix some errors in the previous checkin.
[libpcap] / pcap-linux.c
index 4e1a22ee93e6ed2c441e4a7f0a7f39eb9ab77d99..f78c33d8c816de7f50729762b681286922cb62d4 100644 (file)
@@ -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 == ':') {
                                /*