diff options
author | Daniel Martí <mvdan@mvdan.cc> | 2019-03-05 20:21:17 +0000 |
---|---|---|
committer | Daniel Martí <mvdan@mvdan.cc> | 2019-03-05 20:31:32 +0000 |
commit | 340129e4c8c56a371859b7434de89478610cab81 (patch) | |
tree | ddb925e1793805a8de08091ce9dfc05fd5637bb3 /src/runtime/signal_unix.go | |
parent | a125bdb49b9aa96f3185ae4dfcc0f6d13b998724 (diff) | |
download | go-340129e4c8c56a371859b7434de89478610cab81.tar.gz go-340129e4c8c56a371859b7434de89478610cab81.zip |
all: join a few chained ifs
I had been finding these over a year or so, but none were big enough
changes to warrant CLs. They're a handful now, so clean them all up in a
single commit.
The smaller bodies get a bit simpler, but most importantly, the larger
bodies get unindented.
Change-Id: I5707a6fee27d4c9ff9efd3d363af575d7a4bf2aa
Reviewed-on: https://go-review.googlesource.com/c/go/+/165340
Run-TryBot: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/runtime/signal_unix.go')
-rw-r--r-- | src/runtime/signal_unix.go | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 15f1799801..8814f7836d 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -503,16 +503,14 @@ func raisebadsignal(sig uint32, c *sigctxt) { //go:nosplit func crash() { - if GOOS == "darwin" { - // OS X core dumps are linear dumps of the mapped memory, - // from the first virtual byte to the last, with zeros in the gaps. - // Because of the way we arrange the address space on 64-bit systems, - // this means the OS X core file will be >128 GB and even on a zippy - // workstation can take OS X well over an hour to write (uninterruptible). - // Save users from making that mistake. - if GOARCH == "amd64" { - return - } + // OS X core dumps are linear dumps of the mapped memory, + // from the first virtual byte to the last, with zeros in the gaps. + // Because of the way we arrange the address space on 64-bit systems, + // this means the OS X core file will be >128 GB and even on a zippy + // workstation can take OS X well over an hour to write (uninterruptible). + // Save users from making that mistake. + if GOOS == "darwin" && GOARCH == "amd64" { + return } dieFromSignal(_SIGABRT) |