summaryrefslogtreecommitdiff
path: root/print-rip.c
diff options
context:
space:
mode:
authorguy <guy>2002-09-05 21:25:34 +0000
committerguy <guy>2002-09-05 21:25:34 +0000
commitc422d3ab0f6de2d38512a4566637bc47df291e74 (patch)
tree2d4881bf0fd7ad4e433201643b5b6a66f17e997c /print-rip.c
parentc2bfaa85753ea1cad8c3729692a6bdbb80780f91 (diff)
downloadtcpdump-c422d3ab0f6de2d38512a4566637bc47df291e74.tar.gz
Get rid of the "-Wno-unused" flag, and fix up most of the
unused-parameter problems reported by GCC. Add an _U_ tag to label parameters as unused if the function is called through a pointer (so that you can't change its signature by removing parameters) or if there are unused parameters only because the function isn't complete. Add some additional bounds checks the necessity for which was revealed while cleaning up unused-parameter problems. Make some routines static. "lcp_print()", defined in "print-lcp.c", isn't called anywhere - "print-ppp.c" has the code to dissect LCP. Get rid of "print-lcp.c".
Diffstat (limited to 'print-rip.c')
-rw-r--r--print-rip.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/print-rip.c b/print-rip.c
index 5b2220e6..78403a4b 100644
--- a/print-rip.c
+++ b/print-rip.c
@@ -21,7 +21,7 @@
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.51 2002-09-05 00:00:18 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/tcpdump/print-rip.c,v 1.52 2002-09-05 21:25:46 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
@@ -69,7 +69,7 @@ rip_printblk(const u_char *cp, const u_char *ep)
}
static void
-rip_entry_print_v1(register int vers, register const struct rip_netinfo *ni)
+rip_entry_print_v1(register const struct rip_netinfo *ni)
{
register u_short family;
@@ -97,7 +97,7 @@ rip_entry_print_v1(register int vers, register const struct rip_netinfo *ni)
}
static void
-rip_entry_print_v2(register int vers, register const struct rip_netinfo *ni)
+rip_entry_print_v2(register const struct rip_netinfo *ni)
{
register u_char *p;
register u_short family;
@@ -208,9 +208,9 @@ rip_print(const u_char *dat, u_int length)
ni = (struct rip_netinfo *)(rp + 1);
for (; i >= sizeof(*ni); ++ni) {
if (rp->rip_vers == 1)
- rip_entry_print_v1(rp->rip_vers, ni);
+ rip_entry_print_v1(ni);
else
- rip_entry_print_v2(rp->rip_vers, ni);
+ rip_entry_print_v2(ni);
i -= sizeof(*ni);
}
if (trunc)