summaryrefslogtreecommitdiff
path: root/usr.sbin/tcpdump
diff options
context:
space:
mode:
authorTodd T. Fries <todd@cvs.openbsd.org>2007-06-01 18:19:41 +0000
committerTodd T. Fries <todd@cvs.openbsd.org>2007-06-01 18:19:41 +0000
commit5e246eccb4b3d073eb37d5ab849f5c434adcf2ef (patch)
tree172d59b4c50341b90a0fd35855bb0d9fbf9d92e4 /usr.sbin/tcpdump
parentb49d79ccbfde6b2374d16723238c96304c763f74 (diff)
Move a useless warning to the only case that uses it (-f) from canacar@
ok beck@
Diffstat (limited to 'usr.sbin/tcpdump')
-rw-r--r--usr.sbin/tcpdump/tcpdump.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/tcpdump.c b/usr.sbin/tcpdump/tcpdump.c
index f88fc550b1f..85d6f1155ac 100644
--- a/usr.sbin/tcpdump/tcpdump.c
+++ b/usr.sbin/tcpdump/tcpdump.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tcpdump.c,v 1.55 2006/06/16 16:55:46 deraadt Exp $ */
+/* $OpenBSD: tcpdump.c,v 1.56 2007/06/01 18:19:40 todd Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997
@@ -26,7 +26,7 @@ static const char copyright[] =
"@(#) Copyright (c) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997\n\
The Regents of the University of California. All rights reserved.\n";
static const char rcsid[] =
- "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.55 2006/06/16 16:55:46 deraadt Exp $ (LBL)";
+ "@(#) $Header: /cvs/OpenBSD/src/usr.sbin/tcpdump/tcpdump.c,v 1.56 2007/06/01 18:19:40 todd Exp $ (LBL)";
#endif
/*
@@ -423,7 +423,8 @@ main(int argc, char **argv)
/* state: STATE_BPF */
if (pcap_lookupnet(device, &localnet, &netmask, ebuf)) {
- warning("%s", ebuf);
+ if (fflag)
+ warning("%s", ebuf);
localnet = 0;
netmask = 0;
}