summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2004-01-20 09:00:41 +0000
committerotto <otto@openbsd.org>2004-01-20 09:00:41 +0000
commitbd4a48e67940f58998b2086d61495e15c7c673ab (patch)
treed4dc73e3925d92ffd60e3c0a24fccb1c94d9e6cd
parentDefault xfs device is /dev/xfs0. Spotted by theo@ (diff)
downloadwireguard-openbsd-bd4a48e67940f58998b2086d61495e15c7c673ab.tar.xz
wireguard-openbsd-bd4a48e67940f58998b2086d61495e15c7c673ab.zip
If you go through the trouble of caching the name of the last printed
rpc num, you might as well use it later too. ok canacar@
-rw-r--r--usr.sbin/tcpdump/print-sunrpc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/tcpdump/print-sunrpc.c b/usr.sbin/tcpdump/print-sunrpc.c
index 53475f15872..a6962ac425f 100644
--- a/usr.sbin/tcpdump/print-sunrpc.c
+++ b/usr.sbin/tcpdump/print-sunrpc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: print-sunrpc.c,v 1.13 2002/02/19 19:39:40 millert Exp $ */
+/* $OpenBSD: print-sunrpc.c,v 1.14 2004/01/20 09:00:41 otto Exp $ */
/*
* Copyright (c) 1992, 1993, 1994, 1995, 1996
@@ -23,7 +23,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-sunrpc.c,v 1.13 2002/02/19 19:39:40 millert Exp $ (LBL)";
+ "@(#) $Header: /home/cvs/src/usr.sbin/tcpdump/print-sunrpc.c,v 1.14 2004/01/20 09:00:41 otto Exp $ (LBL)";
#endif
#include <sys/param.h>
@@ -111,6 +111,7 @@ progstr(prog)
if (lastprog != 0 && prog == lastprog)
return (buf);
+ lastprog = prog;
rp = getrpcbynumber(prog);
if (rp == NULL)
snprintf(buf, sizeof(buf), "#%u", prog);