From 3b75d69dbbab2ad25fb1270bb4b2124c8184c847 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Wed, 9 Jul 2025 19:08:42 +0200 Subject: [PATCH] tidy-up: replace `(1 != ` expressions 1 --- lib/socks_sspi.c | 2 +- lib/vtls/openssl.c | 2 +- tests/server/tftpd.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index 82147562b7..795614bf6d 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -492,7 +492,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf, memcpy(socksreq, &gss_enc, 1); code = Curl_conn_cf_send(cf->next, data, (char *)socksreq, 1, FALSE, &written); - if(code || (1 != written)) { + if(code || (written != 1)) { failf(data, "Failed to send SSPI encryption type."); Curl_pSecFn->DeleteSecurityContext(&sspi_context); return CURLE_COULDNT_CONNECT; diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index ebe762a89a..4e951d11e8 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -4487,7 +4487,7 @@ static CURLcode ossl_connect_step2(struct Curl_cfilter *cf, /* 1 is fine 0 is "not successful but was shut down controlled" <0 is "handshake was not successful, because a fatal error occurred" */ - if(1 != err) { + if(err != 1) { int detail = SSL_get_error(octx->ssl, err); CURL_TRC_CF(data, cf, "SSL_connect() -> err=%d, detail=%d", err, detail); diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index 203bbb2598..47fedd7459 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -481,7 +481,7 @@ static ssize_t write_behind(struct testcase *test, int convert) } /* formerly putc(c, file); */ - if(1 != write(test->ofile, &c, 1)) + if(write(test->ofile, &c, 1) != 1) break; skipit: prevchar = c;