Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/sbin/route Pull up revision 1.15 (requested by is):
details: https://anonhg.NetBSD.org/src/rev/098032bc941a
branches: netbsd-1-4
changeset: 470996:098032bc941a
user: he <he%NetBSD.org@localhost>
date: Tue Oct 10 22:25:14 2000 +0000
description:
Pull up revision 1.15 (requested by is):
Format string cleanup.
diffstat:
sbin/route/show.c | 13 ++++++-------
1 files changed, 6 insertions(+), 7 deletions(-)
diffs (55 lines):
diff -r 64a5c303b77d -r 098032bc941a sbin/route/show.c
--- a/sbin/route/show.c Tue Oct 10 22:25:11 2000 +0000
+++ b/sbin/route/show.c Tue Oct 10 22:25:14 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: show.c,v 1.8 1998/10/23 05:36:43 lukem Exp $ */
+/* $NetBSD: show.c,v 1.8.2.1 2000/10/10 22:25:14 he Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "from: @(#)route.c 8.3 (Berkeley) 3/9/94";
#else
-__RCSID("$NetBSD: show.c,v 1.8 1998/10/23 05:36:43 lukem Exp $");
+__RCSID("$NetBSD: show.c,v 1.8.2.1 2000/10/10 22:25:14 he Exp $");
#endif
#endif /* not lint */
@@ -94,7 +94,7 @@
static void p_rtentry __P((struct rt_msghdr *));
static void pr_family __P((int));
static void p_sockaddr __P((struct sockaddr *, int, int ));
-static void p_flags __P((int, char *));
+static void p_flags __P((int));
/*
* Print routing tables.
@@ -197,7 +197,7 @@
sa = (struct sockaddr *)(sa->sa_len + (char *)sa);
p_sockaddr(sa, 0, 18);
}
- p_flags(rtm->rtm_flags & interesting, "%-6.6s ");
+ p_flags(rtm->rtm_flags & interesting);
putchar('\n');
}
@@ -326,9 +326,8 @@
}
static void
-p_flags(f, format)
+p_flags(f)
int f;
- char *format;
{
char name[33], *flags;
const struct bits *p = bits;
@@ -337,6 +336,6 @@
if (p->b_mask & f)
*flags++ = p->b_val;
*flags = '\0';
- printf(format, name);
+ printf("%-6.6s ", name);
}
Home |
Main Index |
Thread Index |
Old Index