summaryrefslogtreecommitdiff
path: root/dumpcap.c
diff options
context:
space:
mode:
authorStephen Fisher <stephenfisher-wireshark@outlook.com>2012-12-10 23:53:09 +0000
committerStephen Fisher <stephenfisher-wireshark@outlook.com>2012-12-10 23:53:09 +0000
commit0537be2e5eb1782193d00e24072444e4a02924e8 (patch)
treeb9906bb19df4492b960efd9bd4f840f5fb252ed5 /dumpcap.c
parent4daca920534ead8a5e5946885804cd9249d43c63 (diff)
downloadwireshark-0537be2e5eb1782193d00e24072444e4a02924e8.tar.gz
Change variable "devname" to "devicename" in numerous places to avoid
to avoid -Wshadow warnings about conflicting with BSD's devname() function. svn path=/trunk/; revision=46494
Diffstat (limited to 'dumpcap.c')
-rw-r--r--dumpcap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/dumpcap.c b/dumpcap.c
index 51c237c361..da4eb5673b 100644
--- a/dumpcap.c
+++ b/dumpcap.c
@@ -964,7 +964,7 @@ capture_interface_list(int *err, char **err_str)
* rest-of-the-universe libpcap.
*/
static int
-get_pcap_linktype(pcap_t *pch, const char *devname
+get_pcap_linktype(pcap_t *pch, const char *devicename
#ifndef _AIX
_U_
#endif
@@ -1026,9 +1026,9 @@ get_pcap_linktype(pcap_t *pch, const char *devname
* Find the last component of the device name, which is the
* interface name.
*/
- ifacename = strchr(devname, '/');
+ ifacename = strchr(devicename, '/');
if (ifacename == NULL)
- ifacename = devname;
+ ifacename = devicename;
/* See if it matches any of the LAN device names. */
if (strncmp(ifacename, "en", 2) == 0) {
@@ -1101,7 +1101,7 @@ create_data_link_info(int dlt)
* Get the capabilities of a network device.
*/
static if_capabilities_t *
-get_if_capabilities(const char *devname, gboolean monitor_mode
+get_if_capabilities(const char *devicename, gboolean monitor_mode
#ifndef HAVE_PCAP_CREATE
_U_
#endif
@@ -1141,7 +1141,7 @@ get_if_capabilities(const char *devname, gboolean monitor_mode
*/
errbuf[0] = '\0';
#ifdef HAVE_PCAP_OPEN
- pch = pcap_open(devname, MIN_PACKET_SIZE, 0, 0, NULL, errbuf);
+ pch = pcap_open(devicename, MIN_PACKET_SIZE, 0, 0, NULL, errbuf);
caps->can_set_rfmon = FALSE;
if (pch == NULL) {
if (err_str != NULL)
@@ -1150,7 +1150,7 @@ get_if_capabilities(const char *devname, gboolean monitor_mode
return NULL;
}
#elif defined(HAVE_PCAP_CREATE)
- pch = pcap_create(devname, errbuf);
+ pch = pcap_create(devicename, errbuf);
if (pch == NULL) {
if (err_str != NULL)
*err_str = g_strdup(errbuf);
@@ -1200,7 +1200,7 @@ get_if_capabilities(const char *devname, gboolean monitor_mode
return NULL;
}
#else
- pch = pcap_open_live(devname, MIN_PACKET_SIZE, 0, 0, errbuf);
+ pch = pcap_open_live(devicename, MIN_PACKET_SIZE, 0, 0, errbuf);
caps->can_set_rfmon = FALSE;
if (pch == NULL) {
if (err_str != NULL)
@@ -1209,7 +1209,7 @@ get_if_capabilities(const char *devname, gboolean monitor_mode
return NULL;
}
#endif
- deflt = get_pcap_linktype(pch, devname);
+ deflt = get_pcap_linktype(pch, devicename);
#ifdef HAVE_PCAP_LIST_DATALINKS
nlt = pcap_list_datalinks(pch, &linktypes);
if (nlt == 0 || linktypes == NULL) {