1
0
mirror of https://github.com/golang/go synced 2024-11-23 11:50:09 -07:00

runtime: fix missing error print in TestCgoSigfwd

The result of the call to fmt.Errorf was unused. It was clearly
intending to print the message, not simply construct an error.

Change-Id: I14856214c521a51fe4b45690e6c35fbb17e66577
Reviewed-on: https://go-review.googlesource.com/c/go/+/443375
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
This commit is contained in:
Austin Clements 2022-10-17 11:29:34 -04:00
parent e72da1c15d
commit 767df51b4d

View File

@ -61,7 +61,7 @@ var nilPtr *byte
func f() (ret bool) { func f() (ret bool) {
defer func() { defer func() {
if recover() == nil { if recover() == nil {
fmt.Errorf("ERROR: couldn't raise SIGSEGV in Go.") fmt.Fprintf(os.Stderr, "ERROR: couldn't raise SIGSEGV in Go\n")
C.exit(2) C.exit(2)
} }
ret = true ret = true