Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Apr 2010 14:11:59 +0000 (UTC)
From:      Nathan Whitehorn <nwhitehorn@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: r207064 - stable/8/contrib/top
Message-ID:  <201004221411.o3MEBxus099219@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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';
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201004221411.o3MEBxus099219>