diff options
author | jb <jb@FreeBSD.org> | 1998-01-24 20:57:38 +0000 |
---|---|---|
committer | jb <jb@FreeBSD.org> | 1998-01-24 20:57:38 +0000 |
commit | 58cb73a02bac1750506a4035bf7da10dc5336d29 (patch) | |
tree | 270ca87b3a8fbe13cf8af304dd9f55e076e8ceda /lib/libc/gen | |
parent | 2fbcdbb0fa2e0829e206ac6e667194eba3aae7d3 (diff) | |
download | FreeBSD-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.c | 4 |
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); } |