tlibventi: import changes from plan 9 - plan9port - [fork] Plan 9 from user spa… | |
git clone git://src.adamsgaard.dk/plan9port | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit f7cca88267372c8a5a771923a19ea4f817113cf2 | |
parent cbc99e3e52703f61aee028b34f135c2e05a6a5db | |
Author: David du Colombier <[email protected]> | |
Date: Tue, 7 Jun 2011 14:25:02 -0400 | |
libventi: import changes from plan 9 | |
R=rsc | |
CC=plan9port.codebot | |
http://codereview.appspot.com/4530100 | |
Diffstat: | |
M src/libventi/mem.c | 7 +++---- | |
1 file changed, 3 insertions(+), 4 deletions(-) | |
--- | |
diff --git a/src/libventi/mem.c b/src/libventi/mem.c | |
t@@ -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; | |
t@@ -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++; | |
} | |