tidy-up: replace (1 != expressions 1

This commit is contained in:
Viktor Szakats 2025-07-09 19:08:42 +02:00
parent 656c1cae6a
commit 3b75d69dbb
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
3 changed files with 3 additions and 3 deletions

View file

@ -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;

View file

@ -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);

View file

@ -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;