From: Marat Khabibullin Date: Fri, 15 Feb 2019 13:22:36 +0000 (+0000) Subject: go/cmd, crypto/x509, net/textproto, html/template: fix minor issues with nil values X-Git-Tag: go1.13beta1~1143 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=3f3d604a7aa2194ac25ce74c686ad6da3a25cb63;p=gostls13.git go/cmd, crypto/x509, net/textproto, html/template: fix minor issues with nil values Remove redundant checks for nil value, add missing nil checks to prevent tests from failing with 'nil pointer dereference'. Fixes #30208. Change-Id: I59091ba4014afcb5300567fd7e73fea43c6bb2ee GitHub-Last-Rev: 20501470bbb8ad8fd60f6f87b4594ab64fcfdff1 GitHub-Pull-Request: golang/go#30226 Reviewed-on: https://go-review.googlesource.com/c/go/+/162657 Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/go/internal/work/exec.go b/src/cmd/go/internal/work/exec.go index 3a7d3fe767..62ae01e555 100644 --- a/src/cmd/go/internal/work/exec.go +++ b/src/cmd/go/internal/work/exec.go @@ -104,9 +104,7 @@ func (b *Builder) Do(root *Action) { var err error if a.Func != nil && (!a.Failed || a.IgnoreFail) { - if err == nil { - err = a.Func(b, a) - } + err = a.Func(b, a) } // The actions run in parallel but all the updates to the