mirror of
https://github.com/golang/go
synced 2024-11-18 05:44:47 -07:00
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 <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
parent
5514332ed9
commit
66121ce8a9
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user