summaryrefslogtreecommitdiff
path: root/lib/socks.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-04-19 10:46:11 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-04-22 09:10:17 +0200
commit063d3f3b96e40b3bf770d04d90612064b9a53c49 (patch)
treedf0a46b661da2352d190a24e4c829ac6052c2a14 /lib/socks.c
parent19ea52da4df3c3ebc399ae25e705c7a8b5d45d95 (diff)
downloadcurl-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.c6
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)",