]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove use of ?:
authorGustavo Niemeyer <gustavo@niemeyer.net>
Fri, 17 Feb 2012 19:13:16 +0000 (17:13 -0200)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Fri, 17 Feb 2012 19:13:16 +0000 (17:13 -0200)
Fixes #3061.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5656089

src/pkg/runtime/mheap.c

index a40a14512b6b4f0129f30d4a585df6134e47a1fc..761246a47f0aaf8c1f1734e164ae7955ac107173 100644 (file)
@@ -346,7 +346,10 @@ runtime·MHeap_Scavenger(void)
        // we hand it back to the operating system.
        limit = 5*60*1e9;
        // Make wake-up period small enough for the sampling to be correct.
-       tick = forcegc < limit ? forcegc/2 : limit/2;
+       if(forcegc < limit)
+               tick = forcegc/2;
+       else
+               tick = limit/2;
 
        trace = false;
        env = runtime·getenv("GOGCTRACE");