From 4c1122cf139f7b073807f0a9187306518988a08f Mon Sep 17 00:00:00 2001 From: Michael Wallner Date: Mon, 6 Jan 2020 12:28:11 +0100 Subject: [PATCH] c++: fix -Wenum-in-bool-context --- libmemcached/connect.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libmemcached/connect.cc b/libmemcached/connect.cc index 52cd293a..006810bf 100644 --- a/libmemcached/connect.cc +++ b/libmemcached/connect.cc @@ -294,7 +294,7 @@ static bool set_socket_options(memcached_instance_st* server) // If SOCK_CLOEXEC exists then we don't need to call the following if (SOCK_CLOEXEC == 0) { - if (FD_CLOEXEC) + if (FD_CLOEXEC != 0) { int flags; do @@ -447,12 +447,12 @@ static memcached_return_t unix_socket_connect(memcached_instance_st* server) do { int type= SOCK_STREAM; - if (SOCK_CLOEXEC) + if (SOCK_CLOEXEC != 0) { type|= SOCK_CLOEXEC; } - if (SOCK_NONBLOCK) + if (SOCK_NONBLOCK != 0) { type|= SOCK_NONBLOCK; } @@ -542,12 +542,12 @@ static memcached_return_t network_connect(memcached_instance_st* server) } int type= server->address_info_next->ai_socktype; - if (SOCK_CLOEXEC) + if (SOCK_CLOEXEC != 0) { type|= SOCK_CLOEXEC; } - if (SOCK_NONBLOCK) + if (SOCK_NONBLOCK != 0) { type|= SOCK_NONBLOCK; } -- 2.30.2