diff options
| author | Dmitri Shuralyov <dmitshur@golang.org> | 2025-09-10 15:08:27 -0400 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2025-09-11 10:50:00 -0700 |
| commit | 7d562b8460a210ad9d0b65a44fbfb71d2ea81789 (patch) | |
| tree | b11bb7e5aea851b4bfb872ad92070f952433fa12 /src | |
| parent | c34958234414a6ec8512967b3681d45314b50d3a (diff) | |
| download | go-7d562b8460a210ad9d0b65a44fbfb71d2ea81789.tar.xz | |
syscall: actually remove unreachable code
CL 702415 claimed to remove unreachable code, but in reality merely hid
it from vet's unreachable pass. Since the unreachable code isn't serving
an active role in the test, do remove it to simplify code.
Change-Id: I5905b8b566e4ca013bdd1202d1492e3eae6a5ede
Reviewed-on: https://go-review.googlesource.com/c/go/+/702575
Reviewed-by: Ian Lance Taylor <iant@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Mark Freeman <markfreeman@google.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/syscall/env_unix_test.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/syscall/env_unix_test.go b/src/syscall/env_unix_test.go index b44b5b1e17..a005060609 100644 --- a/src/syscall/env_unix_test.go +++ b/src/syscall/env_unix_test.go @@ -96,10 +96,7 @@ func TestClearenv(t *testing.T) { defer func() { ret = recover() }() - if true { // defeat vet's unreachable pass - panic(nil) - } - return "should not return" + panic(nil) } // Allow panic(nil). |
