]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: minor code style improvements (followup to change 9778049)
authorDmitriy Vyukov <dvyukov@google.com>
Sat, 1 Jun 2013 21:45:26 +0000 (01:45 +0400)
committerDmitriy Vyukov <dvyukov@google.com>
Sat, 1 Jun 2013 21:45:26 +0000 (01:45 +0400)
R=golang-dev, r
CC=golang-dev
https://golang.org/cl/9693044

src/pkg/runtime/malloc.goc
src/pkg/runtime/symtab.c

index c0a9232776d01e37998aaa89074385b66fb9d909..1f035cb23933e23f6f1eb96ff643968204febfa6 100644 (file)
@@ -520,7 +520,7 @@ runtime·persistentalloc(uintptr size, uintptr align)
 {
        byte *p;
 
-       if(align) {
+       if(align != 0) {
                if(align&(align-1))
                        runtime·throw("persistentalloc: align is now a power of 2");
                if(align > PageSize)
index f68378cd17b44cff6662ddebd721e07324d2c330..126d0c52041e10e7c95b067a22e8c5867de55780 100644 (file)
@@ -563,7 +563,7 @@ runtime·symtabinit(void)
        // Initialize tables.
        // Memory obtained from runtime·persistentalloc() is not scanned by GC,
        // this is fine because all pointers either point into sections of the executable
-       // or also obtained from persistentmalloc().
+       // or also obtained from persistentalloc().
        func = runtime·persistentalloc((nfunc+1)*sizeof func[0], 0);
        func[nfunc].entry = (uint64)etext;
        fname = runtime·persistentalloc(nfname*sizeof fname[0], 0);