mirror of
https://github.com/curl/curl.git
synced 2026-08-12 19:10:55 +03:00
tidy-up: drop redundant == NULL syntax
Where missed by checksrc. Closes #21935
This commit is contained in:
parent
59213abfb2
commit
014be82a66
19 changed files with 39 additions and 41 deletions
|
|
@ -1888,8 +1888,8 @@ static void sshc_cleanup(struct ssh_conn *sshc)
|
|||
}
|
||||
|
||||
/* worst-case scenario cleanup */
|
||||
DEBUGASSERT(sshc->ssh_session == NULL);
|
||||
DEBUGASSERT(sshc->scp_session == NULL);
|
||||
DEBUGASSERT(!sshc->ssh_session);
|
||||
DEBUGASSERT(!sshc->scp_session);
|
||||
|
||||
if(sshc->readdir_tmp) {
|
||||
ssh_string_free_char(sshc->readdir_tmp);
|
||||
|
|
|
|||
|
|
@ -152,8 +152,7 @@ static void kbd_callback(const char *name, int name_len,
|
|||
/* this function must allocate memory that can be freed by libssh2, which
|
||||
uses the LIBSSH2_FREE_FUNC callback */
|
||||
responses[0].text = Curl_cstrdup(passwd);
|
||||
responses[0].length =
|
||||
responses[0].text == NULL ? 0 : curlx_uztoui(strlen(passwd));
|
||||
responses[0].length = responses[0].text ? curlx_uztoui(strlen(passwd)) : 0;
|
||||
}
|
||||
(void)prompts;
|
||||
} /* kbd_callback */
|
||||
|
|
@ -2607,12 +2606,12 @@ static CURLcode sshc_cleanup(struct ssh_conn *sshc, struct Curl_easy *data,
|
|||
}
|
||||
|
||||
/* worst-case scenario cleanup */
|
||||
DEBUGASSERT(sshc->ssh_session == NULL);
|
||||
DEBUGASSERT(sshc->ssh_channel == NULL);
|
||||
DEBUGASSERT(sshc->sftp_session == NULL);
|
||||
DEBUGASSERT(sshc->sftp_handle == NULL);
|
||||
DEBUGASSERT(sshc->kh == NULL);
|
||||
DEBUGASSERT(sshc->ssh_agent == NULL);
|
||||
DEBUGASSERT(!sshc->ssh_session);
|
||||
DEBUGASSERT(!sshc->ssh_channel);
|
||||
DEBUGASSERT(!sshc->sftp_session);
|
||||
DEBUGASSERT(!sshc->sftp_handle);
|
||||
DEBUGASSERT(!sshc->kh);
|
||||
DEBUGASSERT(!sshc->ssh_agent);
|
||||
|
||||
curlx_safefree(sshc->rsa_pub);
|
||||
curlx_safefree(sshc->rsa);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue