checksrc: ensure using ifdef/ifndef when possible, fix fallouts

Follow-up to 89771d19d5 #18018

Closes #20065
This commit is contained in:
Viktor Szakats 2025-12-21 15:45:53 +01:00
parent e8415a8296
commit 4ad87f2cb8
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
9 changed files with 30 additions and 11 deletions

View file

@ -204,7 +204,7 @@ static CURLcode sftp_error_to_CURLE(int err)
return CURLE_SSH;
}
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
static const char *myssh_statename(sshstate state)
{
static const char * const names[] = {
@ -287,7 +287,7 @@ static void myssh_set_state(struct Curl_easy *data,
struct ssh_conn *sshc,
sshstate nowstate)
{
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
if(sshc->state != nowstate) {
CURL_TRC_SSH(data, "[%s] -> [%s]",
myssh_statename(sshc->state),

View file

@ -274,7 +274,7 @@ static LIBSSH2_FREE_FUNC(my_libssh2_free)
Curl_cfree(ptr);
}
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
static const char *myssh_statename(sshstate state)
{
static const char * const names[] = {
@ -357,7 +357,7 @@ static void myssh_set_state(struct Curl_easy *data,
struct ssh_conn *sshc,
sshstate nowstate)
{
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
if(sshc->state != nowstate) {
CURL_TRC_SSH(data, "[%s] -> [%s]",
myssh_statename(sshc->state),