From owner-svn-src-all@FreeBSD.ORG Mon Apr 19 14:34:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B6505106564A; Mon, 19 Apr 2010 14:34:44 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A54CA8FC29; Mon, 19 Apr 2010 14:34:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o3JEYioR027974; Mon, 19 Apr 2010 14:34:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o3JEYih5027972; Mon, 19 Apr 2010 14:34:44 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201004191434.o3JEYih5027972@svn.freebsd.org> From: Nathan Whitehorn Date: Mon, 19 Apr 2010 14:34:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r206842 - head/contrib/top X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2010 14:34:44 -0000 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';