From: Erik Staab Date: Sat, 3 Sep 2016 22:57:48 +0000 (-0700) Subject: runtime: remove redundant expression from SetFinalizer X-Git-Tag: go1.8beta1~1488 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=66121ce8a95f587be8641f79c66c8536660a16d5;p=gostls13.git runtime: remove redundant expression from SetFinalizer The previous if condition already checks the same expression and doesn't have side effects. Change-Id: Ieaf30a786572b608d0a883052b45fd3f04bc6147 Reviewed-on: https://go-review.googlesource.com/28475 Reviewed-by: Brad Fitzpatrick Run-TryBot: Brad Fitzpatrick TryBot-Result: Gobot Gobot --- diff --git a/src/runtime/mfinal.go b/src/runtime/mfinal.go index 14ebec81bf..9bad6f0aa3 100644 --- a/src/runtime/mfinal.go +++ b/src/runtime/mfinal.go @@ -352,7 +352,7 @@ func SetFinalizer(obj interface{}, finalizer interface{}) { if ft.dotdotdot() { throw("runtime.SetFinalizer: cannot pass " + etyp.string() + " to finalizer " + ftyp.string() + " because dotdotdot") } - if ft.dotdotdot() || ft.inCount != 1 { + if ft.inCount != 1 { throw("runtime.SetFinalizer: cannot pass " + etyp.string() + " to finalizer " + ftyp.string()) } fint := ft.in()[0]