svn commit: r207064 - stable/8/contrib/top

Nathan Whitehorn nwhitehorn at FreeBSD.org
Thu Apr 22 14:11:59 UTC 2010


Author: nwhitehorn
Date: Thu Apr 22 14:11:59 2010
New Revision: 207064
URL: http://svn.freebsd.org/changeset/base/207064

Log:
  MFC r206842:
  
  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:
  stable/8/contrib/top/utils.c
Directory Properties:
  stable/8/contrib/top/   (props changed)
  stable/8/contrib/top/install-sh   (props changed)

Modified: stable/8/contrib/top/utils.c
==============================================================================
--- stable/8/contrib/top/utils.c	Thu Apr 22 13:16:18 2010	(r207063)
+++ stable/8/contrib/top/utils.c	Thu Apr 22 14:11:59 2010	(r207064)
@@ -499,7 +499,7 @@ unsigned long long amt;
 	}
     }
 
-    p = strecpy(p, itoa(amt));
+    p = strecpy(p, itoa((int)amt));
     *p++ = tag;
     *p = '\0';
 


More information about the svn-src-all mailing list