From 2621bd1bac614b63e52d0deb4ab2ff287a9fafa8 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Thu, 19 Oct 2023 16:46:14 -0700 Subject: syscall: add missing type conversion The gofrontend incorrectly accepted code that was missing a type conversion. The test case for this is bug518.go in https://go.dev/cl/536537. Future CLs in this series will detect the type error. Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/536638 --- libgo/go/syscall/errstr.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libgo') diff --git a/libgo/go/syscall/errstr.go b/libgo/go/syscall/errstr.go index 9f688e2..02f228a 100644 --- a/libgo/go/syscall/errstr.go +++ b/libgo/go/syscall/errstr.go @@ -24,7 +24,7 @@ func Errstr(errnum int) string { } return string(b[:i]) } - if errno != ERANGE { + if Errno(errno) != ERANGE { return "strerror_r failure" } } -- cgit v1.1