diff options
Diffstat (limited to 'src/syscall/syscall_openbsd.go')
-rw-r--r-- | src/syscall/syscall_openbsd.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/syscall/syscall_openbsd.go b/src/syscall/syscall_openbsd.go index 5a5ba5a51b..18eafe3521 100644 --- a/src/syscall/syscall_openbsd.go +++ b/src/syscall/syscall_openbsd.go @@ -72,8 +72,10 @@ func Pipe2(p []int, flags int) error { } var pp [2]_C_int err := pipe2(&pp, flags) - p[0] = int(pp[0]) - p[1] = int(pp[1]) + if err == nil { + p[0] = int(pp[0]) + p[1] = int(pp[1]) + } return err } |