From: Guy Harris Date: Fri, 9 Dec 2011 03:40:41 +0000 (-0800) Subject: Squelch uninitialized-variable warning. X-Git-Tag: libpcap-1.3-bp~23 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/49a67a300f9bda747183dde65f4499c66407d555 Squelch uninitialized-variable warning. --- diff --git a/pcap-linux.c b/pcap-linux.c index 16861acc..50752311 100644 --- a/pcap-linux.c +++ b/pcap-linux.c @@ -4311,6 +4311,7 @@ enter_rfmon_mode_wext(pcap_t *handle, int sock_fd, const char *device) * radio metadata. */ montype = MONITOR_WEXT; + cmd = 0; /* * 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. */ - cmd = 0; for (i = 0; i < ireq.u.data.length; i++) { if (strcmp(priv[i].name, "monitor_type") == 0) { /*