diff options
author | rwatson <rwatson@FreeBSD.org> | 2009-10-18 15:58:57 +0000 |
---|---|---|
committer | rwatson <rwatson@FreeBSD.org> | 2009-10-18 15:58:57 +0000 |
commit | f5eb7e9ac7d680f1a0ef47c37c4aef711decacaa (patch) | |
tree | 1dcb68a65ad67c89c8f1aa53b4f4307a70c5ca75 /usr.bin/netstat | |
parent | 8a3b920a5ed99fd9f76cdbcc9e9bfe1d0221bc09 (diff) | |
download | FreeBSD-src-f5eb7e9ac7d680f1a0ef47c37c4aef711decacaa.zip FreeBSD-src-f5eb7e9ac7d680f1a0ef47c37c4aef711decacaa.tar.gz |
Merge r198118 from head to stable/8:
Print routing statistics as unsigned short rather than unsigned int,
otherwise sign extension leads to unlikely values when in the negative
range of the signed short structure fields that hold the statistics.
The type used to hold routing statistics is arguably also incorrect.
Approved by: re (bz)
Diffstat (limited to 'usr.bin/netstat')
-rw-r--r-- | usr.bin/netstat/route.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 735612b..2e9e919 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -1008,11 +1008,11 @@ rt_stats(u_long rtsaddr, u_long rttaddr) #define p(f, m) if (rtstat.f || sflag <= 1) \ printf(m, rtstat.f, plural(rtstat.f)) - p(rts_badredirect, "\t%u bad routing redirect%s\n"); - p(rts_dynamic, "\t%u dynamically created route%s\n"); - p(rts_newgateway, "\t%u new gateway%s due to redirects\n"); - p(rts_unreach, "\t%u destination%s found unreachable\n"); - p(rts_wildcard, "\t%u use%s of a wildcard route\n"); + p(rts_badredirect, "\t%hu bad routing redirect%s\n"); + p(rts_dynamic, "\t%hu dynamically created route%s\n"); + p(rts_newgateway, "\t%hu new gateway%s due to redirects\n"); + p(rts_unreach, "\t%hu destination%s found unreachable\n"); + p(rts_wildcard, "\t%hu use%s of a wildcard route\n"); #undef p if (rttrash || sflag <= 1) |