]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove a redundant nil pointer check.
authorAaron Jacobs <jacobsa@google.com>
Mon, 19 Oct 2015 09:52:55 +0000 (20:52 +1100)
committerDave Cheney <dave@cheney.net>
Mon, 19 Oct 2015 09:58:15 +0000 (09:58 +0000)
It appears this was made possible by commit 89f185f; before that, g was
not dereferenced above.

Change-Id: I70bc571d924b36351392fd4c13d681e938cfb573
Reviewed-on: https://go-review.googlesource.com/16033
Reviewed-by: Andrew Gerrand <adg@golang.org>
src/runtime/panic.go

index 24431c86dc1bd1525ac853583fe0771286f2b84a..f603d109b2ccdff4c36a8827183e6a94f3636313 100644 (file)
@@ -568,9 +568,7 @@ func startpanic_m() {
        switch _g_.m.dying {
        case 0:
                _g_.m.dying = 1
-               if _g_ != nil {
-                       _g_.writebuf = nil
-               }
+               _g_.writebuf = nil
                xadd(&panicking, 1)
                lock(&paniclk)
                if debug.schedtrace > 0 || debug.scheddetail > 0 {