Fix a cast from a pointer to a long instead of an int which was enough

to ruin a 64-bit day.
This commit is contained in:
John Birrell 1998-01-24 20:57:38 +00:00
parent 99e6f3d3e3
commit 2b3f4eadb0

View File

@ -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);
}