diff options
author | Paul A. Patience <paul@apatience.com> | 2022-02-13 21:08:20 +0000 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-13 13:45:17 -0800 |
commit | 9bf2278076ae65f63cf0aacb213c4608f9732bbb (patch) | |
tree | 1e927832adb82129e4642dd5da26ba9185848903 | |
parent | 9ec46dec14376ac3bb042272d6d52c36477cdb6e (diff) | |
download | txr-9bf2278076ae65f63cf0aacb213c4608f9732bbb.tar.gz txr-9bf2278076ae65f63cf0aacb213c4608f9732bbb.tar.bz2 txr-9bf2278076ae65f63cf0aacb213c4608f9732bbb.zip |
sockets: appease -Wint-in-bool-context warning.
* socket.c (open_socket, socketpair_wrap): Replace logical OR of
SOCK_NONBLOCK and SOCK_CLOEXEC with bitwise OR in order to
silence Clang 13's -Wint-in-bool-context warning.
-rw-r--r-- | socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1107,7 +1107,7 @@ static val open_socket(val family, val type, val mode_str) uw_ethrowf(socket_error_s, lit("~a failed: ~d/~s"), self, num(errno), errno_to_str(errno), nao); - if (SOCK_NONBLOCK || SOCK_CLOEXEC) + if (SOCK_NONBLOCK | SOCK_CLOEXEC) type = num_fast(c_num(type, self) & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)); return open_sockfd(num(fd), family, type, mode_str, self); @@ -1126,7 +1126,7 @@ static val socketpair_wrap(val family, val type, val mode_str) uw_ethrowf(socket_error_s, lit("~a failed: ~d/~s"), self, num(errno), errno_to_str(errno), nao); - if (SOCK_NONBLOCK || SOCK_CLOEXEC) + if (SOCK_NONBLOCK | SOCK_CLOEXEC) type = num_fast(c_num(type, self) & ~(SOCK_NONBLOCK | SOCK_CLOEXEC)); { |