diff options
author | David du Colombier <0intro@gmail.com> | 2011-06-07 14:25:02 -0400 |
---|---|---|
committer | Russ Cox <rsc@swtch.com> | 2011-06-07 14:25:02 -0400 |
commit | f7cca88267372c8a5a771923a19ea4f817113cf2 (patch) | |
tree | 1b1d5a870e402e8ef475f22b81b050a34eeab39a /src/libventi | |
parent | cbc99e3e52703f61aee028b34f135c2e05a6a5db (diff) | |
download | plan9port-f7cca88267372c8a5a771923a19ea4f817113cf2.tar.gz plan9port-f7cca88267372c8a5a771923a19ea4f817113cf2.tar.bz2 plan9port-f7cca88267372c8a5a771923a19ea4f817113cf2.zip |
libventi: import changes from plan 9
R=rsc
CC=plan9port.codebot
http://codereview.appspot.com/4530100
Diffstat (limited to 'src/libventi')
-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++; } |