Commit f9fff455 authored by Ainar Garipov's avatar Ainar Garipov Committed by Robert Griesemer

go/build, go/doc: fix tautological conditions

These issues were found by the new vet's nilness check. The variables
were already checked against nil, so remove extra checks.

Change-Id: Ie252ccfcc755f3d06f691f354bf13d5a623fe17b
Reviewed-on: https://go-review.googlesource.com/c/148937Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent 8e0ec5ec
......@@ -118,7 +118,7 @@ func testRead(t *testing.T, tests []readTest, read func(io.Reader) ([]byte, erro
}
continue
}
if err == nil && tt.err != "" {
if tt.err != "" {
t.Errorf("#%d: success, expected %q", i, tt.err)
continue
}
......
......@@ -81,7 +81,7 @@ func (mset methodSet) add(m *Func) {
mset[m.Name] = m
return
}
if old != nil && m.Level == old.Level {
if m.Level == old.Level {
// conflict - mark it using a method with nil Decl
mset[m.Name] = &Func{
Name: m.Name,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment