From d0fb649713e6435cb854fcb202c6979c8a137c0b Mon Sep 17 00:00:00 2001 From: Marvin Stenger Date: Tue, 29 Mar 2016 14:09:22 +0200 Subject: 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 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot --- src/syscall/exec_unix.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/syscall/exec_unix.go') 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 -- cgit v1.3-5-g9baa