summaryrefslogtreecommitdiffstats
path: root/contrib/top
diff options
context:
space:
mode:
authornwhitehorn <nwhitehorn@FreeBSD.org>2010-04-22 14:11:59 +0000
committernwhitehorn <nwhitehorn@FreeBSD.org>2010-04-22 14:11:59 +0000
commit1d91b9b8bd82bf8ff8c292bd5f2094d0f41ec8db (patch)
treeec61f11882b0a66ca66edb3c80a29a82d74ddbcc /contrib/top
parentfbdaed42d025dfa775c4ae196d05fa5e8fcdbef0 (diff)
downloadFreeBSD-src-1d91b9b8bd82bf8ff8c292bd5f2094d0f41ec8db.zip
FreeBSD-src-1d91b9b8bd82bf8ff8c292bd5f2094d0f41ec8db.tar.gz
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.
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