Author: nwhitehorn Date: Mon Apr 19 14:34:44 2010 New Revision: 206842 URL: http://svn.freebsd.org/changeset/base/206842
Log: Fix brokenness in top on big-endian 32-bit systems introduced when changing format_k2 to take a long long. Because itoa is defined as a K&R C function, without prototyping its arguments, format_k2 passed a 64-bit value, but itoa() received only the first word, showing '0' in all memory fields. Modified: head/contrib/top/utils.c Modified: head/contrib/top/utils.c ============================================================================== --- head/contrib/top/utils.c Mon Apr 19 14:23:15 2010 (r206841) +++ head/contrib/top/utils.c Mon Apr 19 14:34:44 2010 (r206842) @@ -499,7 +499,7 @@ unsigned long long amt; } } - p = strecpy(p, itoa(amt)); + p = strecpy(p, itoa((int)amt)); *p++ = tag; *p = '\0'; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"