]> The Tcpdump Group git mirrors - libpcap/commitdiff
Squelch uninitialized-variable warning.
authorGuy Harris <[email protected]>
Fri, 9 Dec 2011 03:40:41 +0000 (19:40 -0800)
committerGuy Harris <[email protected]>
Fri, 9 Dec 2011 03:40:41 +0000 (19:40 -0800)
pcap-linux.c

index 16861acc88a18a606ab5d22855df5b15bb241885..5075231158be1c4938993472003571f5108abca1 100644 (file)
@@ -4311,6 +4311,7 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device)
         * radio metadata.
         */
        montype = MONITOR_WEXT;
         * radio metadata.
         */
        montype = MONITOR_WEXT;
+       cmd = 0;
 
        /*
         * Try to get all the Wireless Extensions private ioctls
 
        /*
         * Try to get all the Wireless Extensions private ioctls
@@ -4371,7 +4372,6 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device)
                 * Look for private ioctls to turn monitor mode on or, if
                 * monitor mode is on, to set the header type.
                 */
                 * Look for private ioctls to turn monitor mode on or, if
                 * monitor mode is on, to set the header type.
                 */
-               cmd = 0;
                for (i = 0; i < ireq.u.data.length; i++) {
                        if (strcmp(priv[i].name, "monitor_type") == 0) {
                                /*
                for (i = 0; i < ireq.u.data.length; i++) {
                        if (strcmp(priv[i].name, "monitor_type") == 0) {
                                /*