aboutsummaryrefslogtreecommitdiff
path: root/src/syscall/syscall_linux_ppc64x.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/syscall/syscall_linux_ppc64x.go')
-rw-r--r--src/syscall/syscall_linux_ppc64x.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/syscall/syscall_linux_ppc64x.go b/src/syscall/syscall_linux_ppc64x.go
index 45bf667407..639d5c64ab 100644
--- a/src/syscall/syscall_linux_ppc64x.go
+++ b/src/syscall/syscall_linux_ppc64x.go
@@ -87,8 +87,10 @@ func Pipe(p []int) (err error) {
}
var pp [2]_C_int
err = pipe2(&pp, 0)
- p[0] = int(pp[0])
- p[1] = int(pp[1])
+ if err == nil {
+ p[0] = int(pp[0])
+ p[1] = int(pp[1])
+ }
return
}
@@ -100,8 +102,10 @@ func Pipe2(p []int, flags int) (err 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
}