tidy-up: drop redundant != NULL syntax

Where missed by checksrc.

Closes #21932
This commit is contained in:
Viktor Szakats 2026-06-09 13:38:17 +02:00
parent d8c97b021b
commit 59213abfb2
No known key found for this signature in database
32 changed files with 58 additions and 59 deletions

View file

@ -479,9 +479,9 @@ static CURLcode ssh_check_fingerprint(struct Curl_easy *data,
const char *pubkey_sha256 = data->set.str[STRING_SSH_HOST_PUBLIC_KEY_SHA256];
infof(data, "SSH MD5 public key: %s",
pubkey_md5 != NULL ? pubkey_md5 : "NULL");
pubkey_md5 ? pubkey_md5 : "NULL");
infof(data, "SSH SHA256 public key: %s",
pubkey_sha256 != NULL ? pubkey_sha256 : "NULL");
pubkey_sha256 ? pubkey_sha256 : "NULL");
if(pubkey_sha256) {
const char *fingerprint = NULL;
@ -1098,7 +1098,7 @@ static CURLcode ssh_state_pkey_init(struct Curl_easy *data,
sshc->authed = FALSE;
if((data->set.ssh_auth_types & CURLSSH_AUTH_PUBLICKEY) &&
(strstr(sshc->authlist, "publickey") != NULL)) {
strstr(sshc->authlist, "publickey")) {
bool out_of_memory = FALSE;
sshc->rsa_pub = sshc->rsa = NULL;
@ -1587,7 +1587,7 @@ static CURLcode ssh_state_auth_pass_init(struct Curl_easy *data,
struct ssh_conn *sshc)
{
if((data->set.ssh_auth_types & CURLSSH_AUTH_PASSWORD) &&
(strstr(sshc->authlist, "password") != NULL)) {
strstr(sshc->authlist, "password")) {
myssh_to(data, sshc, SSH_AUTH_PASS);
}
else {
@ -1626,7 +1626,7 @@ static CURLcode ssh_state_auth_host_init(struct Curl_easy *data,
struct ssh_conn *sshc)
{
if((data->set.ssh_auth_types & CURLSSH_AUTH_HOST) &&
(strstr(sshc->authlist, "hostbased") != NULL)) {
strstr(sshc->authlist, "hostbased")) {
myssh_to(data, sshc, SSH_AUTH_HOST);
}
else {
@ -1640,7 +1640,7 @@ static CURLcode ssh_state_auth_agent_init(struct Curl_easy *data,
{
int rc = 0;
if((data->set.ssh_auth_types & CURLSSH_AUTH_AGENT) &&
(strstr(sshc->authlist, "publickey") != NULL)) {
strstr(sshc->authlist, "publickey")) {
/* Connect to the ssh-agent */
/* The agent could be shared by a curl thread i believe
@ -1736,7 +1736,7 @@ static CURLcode ssh_state_auth_key_init(struct Curl_easy *data,
struct ssh_conn *sshc)
{
if((data->set.ssh_auth_types & CURLSSH_AUTH_KEYBOARD) &&
(strstr(sshc->authlist, "keyboard-interactive") != NULL)) {
strstr(sshc->authlist, "keyboard-interactive")) {
myssh_to(data, sshc, SSH_AUTH_KEY);
}
else {