summaryrefslogtreecommitdiff
path: root/src/syscall/exec_unix.go
diff options
context:
space:
mode:
authorMarvin Stenger <marvin.stenger94@gmail.com>2016-03-29 14:09:22 +0200
committerIan Lance Taylor <iant@golang.org>2016-03-29 14:28:41 +0000
commitd0fb649713e6435cb854fcb202c6979c8a137c0b (patch)
tree29dde456b2e6a71fbbee769c600d36b4632d9474 /src/syscall/exec_unix.go
parentd733cef728e452eb50cc6bcb343cf0f753df57bb (diff)
downloadgo-git-d0fb649713e6435cb854fcb202c6979c8a137c0b.tar.gz
all: use &^ operator if possible
This is a change improving consistency in the source tree. The pattern foo &= ^bar, was only used six times in src/ directory. The usage of the supported &^ (bit clear / AND NOT) operator is way more common, about factor 10x. Change-Id: If26a2994fd81d23d42189bee00245eb84e672cf3 Reviewed-on: https://go-review.googlesource.com/21224 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/syscall/exec_unix.go')
-rw-r--r--src/syscall/exec_unix.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/syscall/exec_unix.go b/src/syscall/exec_unix.go
index 82e33124e2..9fd8cf4dba 100644
--- a/src/syscall/exec_unix.go
+++ b/src/syscall/exec_unix.go
@@ -103,7 +103,7 @@ func SetNonblock(fd int, nonblocking bool) (err error) {
if nonblocking {
flag |= O_NONBLOCK
} else {
- flag &= ^O_NONBLOCK
+ flag &^= O_NONBLOCK
}
_, err = fcntl(fd, F_SETFL, flag)
return err