• Austin Clements's avatar
    runtime: clean up some silly allp loops · 200d0cc1
    Austin Clements authored
    Back in the day, allp was just a pointer to an array. As a result, the
    runtime has a few loops of the form:
    
        for i := 0; ; i++ {
            p := allp[i]
    	if p == nil {
    	    break
    	}
    	...
        }
    
    This is silly now because it requires that allp be one longer than the
    maximum possible number of Ps, but now that allp is in Go it has a
    length.
    
    Replace these with range loops.
    
    Change-Id: I91ef4bc7bd3c9d4fda2264f4aa1b1d0271d7f578
    Reviewed-on: https://go-review.googlesource.com/45571
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarBrad Fitzpatrick <bradfitz@golang.org>
    200d0cc1
Name
Last commit
Last update
.github Loading commit data...
api Loading commit data...
doc Loading commit data...
lib/time Loading commit data...
misc Loading commit data...
src Loading commit data...
test Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
AUTHORS Loading commit data...
CONTRIBUTING.md Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
PATENTS Loading commit data...
README.md Loading commit data...
favicon.ico Loading commit data...
robots.txt Loading commit data...