From: Ezzno J Date: Tue, 14 Nov 2023 02:52:31 +0000 (+0000) Subject: runtime: remove useless nil checking during init of itab X-Git-Tag: go1.22rc1~326 X-Git-Url: http://www.git.cypherpunks.ru/?a=commitdiff_plain;h=e7d582b55dda36e76ce4d0ce770139ca0915b7c5;p=gostls13.git runtime: remove useless nil checking during init of itab Change-Id: I8ef12221e18e163b695d88f4bb8c309763341ec3 GitHub-Last-Rev: d3d4d4cb79418ccbb027a08892a95368888acbbf GitHub-Pull-Request: golang/go#64107 Reviewed-on: https://go-review.googlesource.com/c/go/+/542116 Auto-Submit: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Keith Randall Reviewed-by: Michael Pratt Reviewed-by: Keith Randall --- diff --git a/src/runtime/iface.go b/src/runtime/iface.go index d5a181cae1..4563809a9d 100644 --- a/src/runtime/iface.go +++ b/src/runtime/iface.go @@ -225,13 +225,11 @@ imethods: pkgPath = rtyp.nameOff(x.PkgPath).Name() } if tname.IsExported() || pkgPath == ipkg { - if m != nil { - ifn := rtyp.textOff(t.Ifn) - if k == 0 { - fun0 = ifn // we'll set m.fun[0] at the end - } else { - methods[k] = ifn - } + ifn := rtyp.textOff(t.Ifn) + if k == 0 { + fun0 = ifn // we'll set m.fun[0] at the end + } else { + methods[k] = ifn } continue imethods }