From 9e69ae693d6fdbdb4278ec49ab30c64f73954d40 Mon Sep 17 00:00:00 2001 From: nwhitehorn Date: Mon, 19 Apr 2010 14:34:44 +0000 Subject: 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. --- contrib/top/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib/top') diff --git a/contrib/top/utils.c b/contrib/top/utils.c index a38b2178..43072b1 100644 --- a/contrib/top/utils.c +++ b/contrib/top/utils.c @@ -499,7 +499,7 @@ unsigned long long amt; } } - p = strecpy(p, itoa(amt)); + p = strecpy(p, itoa((int)amt)); *p++ = tag; *p = '\0'; -- cgit v1.1