Date: Tue, 14 Feb 2006 11:57:02 +0000 (UTC) From: Bruce Evans <bde@FreeBSD.org> To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/usr.bin/systat vmstat.c Message-ID: <200602141157.k1EBv3WQ087437@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
bde 2006-02-14 11:57:02 UTC FreeBSD src repository Modified files: usr.bin/systat vmstat.c Log: Fix some minor bugs: Always use snprintf()'s return value, since discarding it is a style bug at best and using it here gives slightly simpler code and better error checking. Use snprintf() in putlongdouble() the same as in putfloat(). (1.25 changed most sprintf()'s to snprintf()'s to fix non-bugs without changing the logic to use the result of snprintf(); 1.27 restored one of the sprintf()s by cloning a stale version of putfloat().) Don't print a too-long field in the unlikely case that the fallback to M units in putint() leaves the field still too long. (The fallback to printing stars was lost in rev.1.58 when the fallback to M units was added.) Revision Changes Path 1.66 +21 -13 src/usr.bin/systat/vmstat.c
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200602141157.k1EBv3WQ087437>