summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen
diff options
context:
space:
mode:
authorjb <jb@FreeBSD.org>1998-01-24 20:57:38 +0000
committerjb <jb@FreeBSD.org>1998-01-24 20:57:38 +0000
commit58cb73a02bac1750506a4035bf7da10dc5336d29 (patch)
tree270ca87b3a8fbe13cf8af304dd9f55e076e8ceda /lib/libc/gen
parent2fbcdbb0fa2e0829e206ac6e667194eba3aae7d3 (diff)
downloadFreeBSD-src-58cb73a02bac1750506a4035bf7da10dc5336d29.zip
FreeBSD-src-58cb73a02bac1750506a4035bf7da10dc5336d29.tar.gz
Fix a cast from a pointer to a long instead of an int which was enough
to ruin a 64-bit day.
Diffstat (limited to 'lib/libc/gen')
-rw-r--r--lib/libc/gen/valloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/gen/valloc.c b/lib/libc/gen/valloc.c
index ec6e2e8..6035329 100644
--- a/lib/libc/gen/valloc.c
+++ b/lib/libc/gen/valloc.c
@@ -42,9 +42,9 @@ void *
valloc(i)
size_t i;
{
- int valsiz = getpagesize(), j;
+ long valsiz = getpagesize(), j;
void *cp = malloc(i + (valsiz-1));
- j = ((int)cp + (valsiz-1)) &~ (valsiz-1);
+ j = ((long)cp + (valsiz-1)) &~ (valsiz-1);
return ((void *)j);
}
OpenPOWER on IntegriCloud