diff options
author | 2020-01-24 22:46:36 +0000 | |
---|---|---|
committer | 2020-01-24 22:46:36 +0000 | |
commit | f96bb33f4775ce2a1279cb96ebaecb010eb3bdc3 (patch) | |
tree | 9b2ab0af0e72e725c026e33cb8dd0226e3808486 /usr.sbin/tcpdump/print-rip.c | |
parent | Add FILES sections; OK espie@ solene@. (diff) | |
download | wireguard-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-rip.c')
-rw-r--r-- | usr.sbin/tcpdump/print-rip.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-rip.c b/usr.sbin/tcpdump/print-rip.c index 4b77c14ecb8..601388e20fe 100644 --- a/usr.sbin/tcpdump/print-rip.c +++ b/usr.sbin/tcpdump/print-rip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-rip.c,v 1.17 2018/07/06 05:47:22 dlg Exp $ */ +/* $OpenBSD: print-rip.c,v 1.18 2020/01/24 22:46:37 procter Exp $ */ /* * Copyright (c) 1989, 1990, 1991, 1993, 1994, 1996 @@ -197,7 +197,7 @@ rip_print(const u_char *dat, u_int length) case RIPCMD_TRACEON: printf("RIPv%d-traceon %d: \"", rp->rip_vers, length); (void)fn_print((const u_char *)(rp + 1), snapend); - fputs("\"", stdout); + printf("\""); break; case RIPCMD_TRACEOFF: printf("RIPv%d-traceoff %d", rp->rip_vers, length); |