Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/netstat Use PRIu64 for printf'ing stuff. Fixes buil...
details: https://anonhg.NetBSD.org/src/rev/3bbf371c918b
branches: trunk
changeset: 747403:3bbf371c918b
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Sun Sep 13 21:46:23 2009 +0000
description:
Use PRIu64 for printf'ing stuff. Fixes build breakage on part-amd64
introduced in rev 1.64 (and reverts a partial fix provided in rev 1.65)
diffstat:
usr.bin/netstat/if.c | 44 ++++++++++++++++++++++----------------------
1 files changed, 22 insertions(+), 22 deletions(-)
diffs (88 lines):
diff -r 2ebae7928d91 -r 3bbf371c918b usr.bin/netstat/if.c
--- a/usr.bin/netstat/if.c Sun Sep 13 21:24:58 2009 +0000
+++ b/usr.bin/netstat/if.c Sun Sep 13 21:46:23 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if.c,v 1.65 2009/09/13 19:04:29 elad Exp $ */
+/* $NetBSD: if.c,v 1.66 2009/09/13 21:46:23 pgoyette Exp $ */
/*
* Copyright (c) 1983, 1988, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "from: @(#)if.c 8.2 (Berkeley) 2/21/94";
#else
-__RCSID("$NetBSD: if.c,v 1.65 2009/09/13 19:04:29 elad Exp $");
+__RCSID("$NetBSD: if.c,v 1.66 2009/09/13 21:46:23 pgoyette Exp $");
#endif
#endif /* not lint */
@@ -216,7 +216,7 @@
continue;
}
- printf("%-5s %-5qu ", name, ifd->ifi_mtu);
+ printf("%-5s %-5" PRIu64, name, ifd->ifi_mtu);
print_addr(rti_info[RTAX_IFP], rti_info, ifd);
break;
@@ -234,7 +234,7 @@
get_rtaddrs(ifam->ifam_addrs, sa, rti_info);
- printf("%-5s %-5qu ", name, ifd->ifi_mtu);
+ printf("%-5s %-5" PRIu64, name, ifd->ifi_mtu);
print_addr(rti_info[RTAX_IFA], rti_info, ifd);
break;
}
@@ -589,16 +589,16 @@
iftot_print(struct iftot *cur, struct iftot *old)
{
if (bflag)
- printf("%10llu %8.8s %10llu %5.5s",
- (unsigned long long)(cur->ift_ib - old->ift_ib), " ",
- (unsigned long long)(cur->ift_ob - old->ift_ob), " ");
+ printf("%10" PRIu64 "%8.8s %10" PRIu64 "%5.5s",
+ cur->ift_ib - old->ift_ib, " ",
+ cur->ift_ob - old->ift_ob, " ");
else
- printf("%8llu %5llu %8llu %5llu %5llu",
- (unsigned long long)(cur->ift_ip - old->ift_ip),
- (unsigned long long)(cur->ift_ie - old->ift_ie),
- (unsigned long long)(cur->ift_op - old->ift_op),
- (unsigned long long)(cur->ift_oe - old->ift_oe),
- (unsigned long long)(cur->ift_co - old->ift_co));
+ printf("%8" PRIu64 "%5" PRIu64 "%8" PRIu64 "%5" PRIu64 "%5" PRIu64,
+ cur->ift_ip - old->ift_ip,
+ cur->ift_ie - old->ift_ie,
+ cur->ift_op - old->ift_op,
+ cur->ift_oe - old->ift_oe,
+ cur->ift_co - old->ift_co);
if (dflag)
printf(" %5llu",
/* XXX ifnet.if_snd.ifq_drops - ip->ift_dr); */
@@ -609,16 +609,16 @@
iftot_print_sum(struct iftot *cur, struct iftot *old)
{
if (bflag)
- printf(" %10llu %8.8s %10llu %5.5s",
- (unsigned long long)(cur->ift_ib - old->ift_ib), " ",
- (unsigned long long)(cur->ift_ob - old->ift_ob), " ");
+ printf(" %10" PRIu64 "%8.8s %10" PRIu64 "%5.5s",
+ cur->ift_ib - old->ift_ib, " ",
+ cur->ift_ob - old->ift_ob, " ");
else
- printf(" %8llu %5llu %8llu %5llu %5llu",
- (unsigned long long)(cur->ift_ip - old->ift_ip),
- (unsigned long long)(cur->ift_ie - old->ift_ie),
- (unsigned long long)(cur->ift_op - old->ift_op),
- (unsigned long long)(cur->ift_oe - old->ift_oe),
- (unsigned long long)(cur->ift_co - old->ift_co));
+ printf(" %8" PRIu64 "%5" PRIu64 "%8" PRIu64 "%5" PRIu64 "%5" PRIu64,
+ cur->ift_ip - old->ift_ip,
+ cur->ift_ie - old->ift_ie,
+ cur->ift_op - old->ift_op,
+ cur->ift_oe - old->ift_oe,
+ cur->ift_co - old->ift_co);
if (dflag)
printf(" %5llu", (unsigned long long)(cur->ift_dr - old->ift_dr));
Home |
Main Index |
Thread Index |
Old Index