mirror of https://github.com/golang/go.git
runtime: don't check _defer against nil twice
This issue was found by the new vet's nilness check. _defer was already checked against nil, so don't check it again. Change-Id: I78725eaec7234b262b3c941e06441ca57f82bdd9 Reviewed-on: https://go-review.googlesource.com/c/148917 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
ff7b245a31
commit
084f2eafcd
|
|
@ -552,9 +552,7 @@ func gentraceback(pc0, sp0, lr0 uintptr, gp *g, skip int, pcbuf *uintptr, max in
|
|||
// It's okay in those situations not to use up the entire defer stack:
|
||||
// incomplete information then is still better than nothing.
|
||||
if callback != nil && n < max && _defer != nil {
|
||||
if _defer != nil {
|
||||
print("runtime: g", gp.goid, ": leftover defer sp=", hex(_defer.sp), " pc=", hex(_defer.pc), "\n")
|
||||
}
|
||||
print("runtime: g", gp.goid, ": leftover defer sp=", hex(_defer.sp), " pc=", hex(_defer.pc), "\n")
|
||||
for _defer = gp._defer; _defer != nil; _defer = _defer.link {
|
||||
print("\tdefer ", _defer, " sp=", hex(_defer.sp), " pc=", hex(_defer.pc), "\n")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue