aboutsummaryrefslogtreecommitdiffstats
path: root/pcap-util.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-11-21 08:30:40 +0000
committerGuy Harris <guy@alum.mit.edu>2003-11-21 08:30:40 +0000
commit23c4738618445bc5ed667b624e149fbad0c42f4e (patch)
tree2ea6d98d03b08c8c2b13646de01ce2b09d5350f4 /pcap-util.c
parent7cca92712dbe934712b9181660018a4238b4f89c (diff)
Pass "strncmp()" the right number of arguments. (Why hasn't anybody
reported this as a problem when compiling on AIX? Doesn't any compiler complain that "strncmp()" isn't being passed enough arguments? GCC sure did in a test program I built on FreeBSD 3.4....) svn path=/trunk/; revision=9055
Diffstat (limited to 'pcap-util.c')
-rw-r--r--pcap-util.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pcap-util.c b/pcap-util.c
index 064e8097a0..30fb056491 100644
--- a/pcap-util.c
+++ b/pcap-util.c
@@ -1,7 +1,7 @@
/* pcap-util.c
* Utility routines for packet capture
*
- * $Id: pcap-util.c,v 1.19 2003/11/01 02:30:14 guy Exp $
+ * $Id: pcap-util.c,v 1.20 2003/11/21 08:30:40 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -141,7 +141,7 @@ get_pcap_linktype(pcap_t *pch, char *devname
*/
linktype = 1;
}
- } else if (strncmp(ifacename, "tr") == 0) {
+ } else if (strncmp(ifacename, "tr", 2) == 0) {
if (linktype == 9) {
/*
* That's the RFC 1573 value for 802.5 (Token Ring);
@@ -150,7 +150,7 @@ get_pcap_linktype(pcap_t *pch, char *devname
*/
linktype = 6;
}
- } else if (strncmp(ifacename, "fi") == 0) {
+ } else if (strncmp(ifacename, "fi", 2) == 0) {
if (linktype == 15) {
/*
* That's the RFC 1573 value for FDDI; map it to
@@ -158,7 +158,7 @@ get_pcap_linktype(pcap_t *pch, char *devname
*/
linktype = 10;
}
- } else if (strncmp(ifacename, "lo") == 0) {
+ } else if (strncmp(ifacename, "lo", 2) == 0) {
if (linktype == 24) {
/*
* That's the RFC 1573 value for "software loopback"