aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2023-10-19 16:46:14 -0700
committerIan Lance Taylor <iant@golang.org>2023-10-23 14:03:10 -0700
commit2621bd1bac614b63e52d0deb4ab2ff287a9fafa8 (patch)
tree19af26bacbb783cc5051ac47bede560731f2148d /libgo
parent32b74c9e1d46932a4bbb1f46353bfc43c702c20a (diff)
downloadgcc-2621bd1bac614b63e52d0deb4ab2ff287a9fafa8.zip
gcc-2621bd1bac614b63e52d0deb4ab2ff287a9fafa8.tar.gz
gcc-2621bd1bac614b63e52d0deb4ab2ff287a9fafa8.tar.bz2
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
Diffstat (limited to 'libgo')
-rw-r--r--libgo/go/syscall/errstr.go2
1 files changed, 1 insertions, 1 deletions
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"
}
}