]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix windows build
authorDmitriy Vyukov <dvyukov@google.com>
Wed, 14 Aug 2013 18:18:49 +0000 (22:18 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Wed, 14 Aug 2013 18:18:49 +0000 (22:18 +0400)
R=golang-dev
CC=golang-dev
https://golang.org/cl/12941043

src/pkg/runtime/mem_windows.c

index 0a1ea38d567f3bff0615c9fae40d8495c989063e..2cf83396faf96779d355b66a20e3bc8467ef190b 100644 (file)
@@ -32,17 +32,17 @@ runtime·SysAlloc(uintptr n)
 void
 runtime·SysUnused(void *v, uintptr n)
 {
-       uintptr r;
+       void *r;
 
        r = runtime·stdcall(runtime·VirtualFree, 3, v, n, (uintptr)MEM_DECOMMIT);
-       if(r == 0)
+       if(r == nil)
                runtime·throw("runtime: failed to decommit pages");
 }
 
 void
 runtime·SysUsed(void *v, uintptr n)
 {
-       uintptr r;
+       void *r;
 
        r = runtime·stdcall(runtime·VirtualAlloc, 4, v, n, (uintptr)MEM_COMMIT, (uintptr)PAGE_READWRITE);
        if(r != v)