Date: Sun, 18 Oct 2009 15:58:57 +0000 (UTC) From: Robert Watson <rwatson@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r198209 - stable/8/usr.bin/netstat Message-ID: <200910181558.n9IFwvk5073106@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: rwatson Date: Sun Oct 18 15:58:57 2009 New Revision: 198209 URL: http://svn.freebsd.org/changeset/base/198209 Log: 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) Modified: stable/8/usr.bin/netstat/ (props changed) stable/8/usr.bin/netstat/route.c Modified: stable/8/usr.bin/netstat/route.c ============================================================================== --- stable/8/usr.bin/netstat/route.c Sun Oct 18 15:21:48 2009 (r198208) +++ stable/8/usr.bin/netstat/route.c Sun Oct 18 15:58:57 2009 (r198209) @@ -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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910181558.n9IFwvk5073106>