summaryrefslogtreecommitdiffstats
path: root/usr.sbin/tcpdump/print-gre.c
diff options
context:
space:
mode:
authorprocter <procter@openbsd.org>2020-01-24 22:46:36 +0000
committerprocter <procter@openbsd.org>2020-01-24 22:46:36 +0000
commitf96bb33f4775ce2a1279cb96ebaecb010eb3bdc3 (patch)
tree9b2ab0af0e72e725c026e33cb8dd0226e3808486 /usr.sbin/tcpdump/print-gre.c
parentAdd FILES sections; OK espie@ solene@. (diff)
downloadwireguard-openbsd-f96bb33f4775ce2a1279cb96ebaecb010eb3bdc3.tar.xz
wireguard-openbsd-f96bb33f4775ce2a1279cb96ebaecb010eb3bdc3.zip
- (void)printf() -> printf(); the cast adds clutter for little value.
- fprintf(stdout, ...) -> printf() - fputs(x, stdout) -> printf(); for consistency. fputs is twice as fast on atom x5-Z8300@1.44GHz but Amdahl sees a pure printf tcpdump only 2% slower than a pure fputs (for constant strings) tcpdump to /dev/null across a 20MB/~170k packet pcap file. ok dlg@ for fputs and ok tedu@ krw@ deraadt@ a2k19 for the rest
Diffstat (limited to 'usr.sbin/tcpdump/print-gre.c')
-rw-r--r--usr.sbin/tcpdump/print-gre.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/tcpdump/print-gre.c b/usr.sbin/tcpdump/print-gre.c
index 8cec128aea2..35f32a9ddab 100644
--- a/usr.sbin/tcpdump/print-gre.c
+++ b/usr.sbin/tcpdump/print-gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-gre.c,v 1.29 2019/12/03 01:43:33 dlg Exp $ */
+/* $OpenBSD: print-gre.c,v 1.30 2020/01/24 22:46:36 procter Exp $ */
/*
* Copyright (c) 2002 Jason L. Wright (jason@thought.net)
@@ -415,7 +415,7 @@ gre_print_pptp(const u_char *p, u_int length, uint16_t flags)
return;
if (length < len) {
- (void)printf(" truncated-pptp - %d bytes missing!",
+ printf(" truncated-pptp - %d bytes missing!",
len - length);
len = length;
}
@@ -467,7 +467,7 @@ gre_print_eoip(const u_char *p, u_int length, uint16_t flags)
printf(" %u", id);
if (length < len) {
- (void)printf(" truncated-eoip - %d bytes missing!",
+ printf(" truncated-eoip - %d bytes missing!",
len - length);
len = length;
}