summaryrefslogtreecommitdiffstats
path: root/contrib/top
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-04-19 14:34:44 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-04-19 14:34:44 +0000
commit9e69ae693d6fdbdb4278ec49ab30c64f73954d40 (patch)
treef7268746469050d06dd21bb7aa608c23398dbb83 /contrib/top
parentea377e0111a4012e67abb55b9df78ea362f84367 (diff)
downloadFreeBSD-src-9e69ae693d6fdbdb4278ec49ab30c64f73954d40.zip
FreeBSD-src-9e69ae693d6fdbdb4278ec49ab30c64f73954d40.tar.gz
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.
Diffstat (limited to 'contrib/top')
-rw-r--r--contrib/top/utils.c2
1 files changed, 1 insertions, 1 deletions
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';
OpenPOWER on IntegriCloud