This commit is contained in:
Viktor Szakats 2025-07-25 14:15:57 +02:00
parent 54b790c5df
commit 3d99136ad6
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
6 changed files with 8 additions and 8 deletions

View file

@ -515,7 +515,7 @@ static bool cpool_foreach(struct Curl_easy *data,
struct connectdata *conn = Curl_node_elem(curr);
curr = Curl_node_next(curr);
if(1 == func(data, conn, param)) {
if(func(data, conn, param) == 1) {
return TRUE;
}
}

View file

@ -872,7 +872,7 @@ parse_netscape(struct Cookie *co,
break;
}
}
if(6 == fields) {
if(fields == 6) {
/* we got a cookie with blank contents, fix it */
co->value = strdup("");
if(!co->value)
@ -881,7 +881,7 @@ parse_netscape(struct Cookie *co,
fields++;
}
if(7 != fields)
if(fields != 7)
/* we did not find the sufficient number of fields */
return CERR_FIELDS;

View file

@ -615,7 +615,7 @@ static CURLcode ftp_readresp(struct Curl_easy *data,
if(ftpcode)
*ftpcode = code;
if(421 == code) {
if(code == 421) {
/* 421 means "Service not available, closing control connection." and FTP
* servers use it to signal that idle session timeout has been exceeded.
* If we ignored the response, it could end up hanging in some cases.

View file

@ -1986,7 +1986,7 @@ static bool gtls_data_pending(struct Curl_cfilter *cf,
DEBUGASSERT(ctx && ctx->backend);
backend = (struct gtls_ssl_backend_data *)ctx->backend;
if(backend->gtls.session &&
0 != gnutls_record_check_pending(backend->gtls.session))
gnutls_record_check_pending(backend->gtls.session) != 0)
return TRUE;
return FALSE;
}

View file

@ -975,7 +975,7 @@ static int passwd_callback(char *buf, int num, int encrypting,
*/
static bool rand_enough(void)
{
return 0 != RAND_status();
return RAND_status() != 0;
}
static CURLcode ossl_seed(struct Curl_easy *data)

View file

@ -1888,8 +1888,8 @@ static int clear_url(void)
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
rc = curl_url_get(u, clear_url_list[i].part, &p, 0);
if(rc != clear_url_list[i].ucode || (clear_url_list[i].out &&
0 != strcmp(p, clear_url_list[i].out))) {
if(rc != clear_url_list[i].ucode ||
(clear_url_list[i].out && strcmp(p, clear_url_list[i].out) != 0)) {
curl_mfprintf(stderr, "unexpected return code line %u\n", __LINE__);
error++;