diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-04-19 10:46:11 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-04-22 09:10:17 +0200 |
commit | 063d3f3b96e40b3bf770d04d90612064b9a53c49 (patch) | |
tree | df0a46b661da2352d190a24e4c829ac6052c2a14 /lib/socks.c | |
parent | 19ea52da4df3c3ebc399ae25e705c7a8b5d45d95 (diff) | |
download | curl-063d3f3b96e40b3bf770d04d90612064b9a53c49.tar.gz |
tidy-up: make conditional checks more consistent
... remove '== NULL' and '!= 0'
Closes #6912
Diffstat (limited to 'lib/socks.c')
-rw-r--r-- | lib/socks.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/socks.c b/lib/socks.c index d1c2a2ed1..5cde4a46a 100644 --- a/lib/socks.c +++ b/lib/socks.c @@ -426,7 +426,7 @@ CURLproxycode Curl_SOCKS4(const char *proxy_user, */ /* wrong version ? */ - if(socksreq[0] != 0) { + if(socksreq[0]) { failf(data, "SOCKS4 reply has wrong version, version should be 0."); return CURLPX_BAD_VERSION; @@ -742,7 +742,7 @@ CURLproxycode Curl_SOCKS5(const char *proxy_user, return CURLPX_OK; } /* ignore the first (VER) byte */ - else if(socksreq[1] != 0) { /* status */ + else if(socksreq[1]) { /* status */ failf(data, "User was rejected by the SOCKS5 server (%d %d).", socksreq[0], socksreq[1]); return CURLPX_USER_REJECTED; @@ -927,7 +927,7 @@ CURLproxycode Curl_SOCKS5(const char *proxy_user, "SOCKS5 reply has wrong version, version should be 5."); return CURLPX_BAD_VERSION; } - else if(socksreq[1] != 0) { /* Anything besides 0 is an error */ + else if(socksreq[1]) { /* Anything besides 0 is an error */ CURLproxycode rc = CURLPX_REPLY_UNASSIGNED; int code = socksreq[1]; failf(data, "Can't complete SOCKS5 connection to %s. (%d)", |