diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libventi/mem.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/libventi/mem.c b/src/libventi/mem.c index 1346126f..dea99a9d 100644 --- a/src/libventi/mem.c +++ b/src/libventi/mem.c @@ -54,8 +54,7 @@ vtbrk(int n) { static Lock lk; static uchar *buf; - static int nbuf; - static int nchunk; + static int nbuf, nchunk; int align, pad; void *p; @@ -67,11 +66,11 @@ vtbrk(int n) align = 4; lock(&lk); - pad = (align - (ulong)buf) & (align-1); + pad = (align - (uintptr)buf) & (align-1); if(n + pad > nbuf) { buf = vtmallocz(ChunkSize); nbuf = ChunkSize; - pad = (align - (ulong)buf) & (align-1); + pad = (align - (uintptr)buf) & (align-1); nchunk++; } |