mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
all: join some chained ifs to unindent code
Found with mvdan.cc/unindent. It skipped the cases where parentheses would need to be added, where comments would have to be moved elsewhere, or where actions and simple logic would mix. One of them was of the form "err != nil && err == io.EOF", so the first part was removed. Change-Id: Ie504c2b03a2c87d10ecbca1b9270069be1171b91 Reviewed-on: https://go-review.googlesource.com/57690 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
305fd9179d
commit
fbc8973a6b
9 changed files with 27 additions and 44 deletions
|
|
@ -3568,13 +3568,11 @@ func procresize(nprocs int32) *p {
|
|||
// free unused P's
|
||||
for i := nprocs; i < old; i++ {
|
||||
p := allp[i]
|
||||
if trace.enabled {
|
||||
if p == getg().m.p.ptr() {
|
||||
// moving to p[0], pretend that we were descheduled
|
||||
// and then scheduled again to keep the trace sane.
|
||||
traceGoSched()
|
||||
traceProcStop(p)
|
||||
}
|
||||
if trace.enabled && p == getg().m.p.ptr() {
|
||||
// moving to p[0], pretend that we were descheduled
|
||||
// and then scheduled again to keep the trace sane.
|
||||
traceGoSched()
|
||||
traceProcStop(p)
|
||||
}
|
||||
// move all runnable goroutines to the global queue
|
||||
for p.runqhead != p.runqtail {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue