Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/systat fix printf format for inet.ip
details: https://anonhg.NetBSD.org/src/rev/fb0e9b87310d
branches: trunk
changeset: 480122:fb0e9b87310d
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jan 04 15:17:00 2000 +0000
description:
fix printf format for inet.ip
(because the entries in struct ipstat is u_quad_t)
diffstat:
usr.bin/systat/ip.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (42 lines):
diff -r d953a8244c52 -r fb0e9b87310d usr.bin/systat/ip.c
--- a/usr.bin/systat/ip.c Tue Jan 04 15:12:42 2000 +0000
+++ b/usr.bin/systat/ip.c Tue Jan 04 15:17:00 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip.c,v 1.2 1999/07/30 16:08:59 ad Exp $ */
+/* $NetBSD: ip.c,v 1.3 2000/01/04 15:17:00 msaitoh Exp $ */
/*
* Copyright (c) 1999 Andy Doran <ad%NetBSD.org@localhost>
@@ -29,7 +29,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: ip.c,v 1.2 1999/07/30 16:08:59 ad Exp $");
+__RCSID("$NetBSD: ip.c,v 1.3 2000/01/04 15:17:00 msaitoh Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -54,7 +54,7 @@
#define LHD(row, str) mvwprintw(wnd, row, 10, str)
#define RHD(row, str) mvwprintw(wnd, row, 45, str);
-#define SHOW(stat, row, col) mvwprintw(wnd, row, col, "%9lu", curstat.stat)
+#define SHOW(stat, row, col) mvwprintw(wnd, row, col, "%9llu", curstat.stat)
struct mystat {
struct ipstat i;
@@ -135,12 +135,12 @@
void
showip(void)
{
- u_long totalout;
+ u_quad_t totalout;
totalout = curstat.i.ips_forward + curstat.i.ips_localout;
SHOW(i.ips_total, 0, 0);
- mvwprintw(wnd, 0, 35, "%9lu", totalout);
+ mvwprintw(wnd, 0, 35, "%9llu", totalout);
SHOW(i.ips_delivered, 1, 0);
SHOW(i.ips_badsum, 2, 0);
SHOW(i.ips_tooshort, 3, 0);
Home |
Main Index |
Thread Index |
Old Index