tidy-up: prefer ifdef/ifndef for single checks

Closes #18018
This commit is contained in:
Viktor Szakats 2025-07-25 14:31:16 +02:00
parent b2bccdc257
commit 89771d19d5
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201
109 changed files with 319 additions and 324 deletions

View file

@ -488,7 +488,7 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
const uint8_t *value, size_t valuelen,
uint8_t flags,
void *userp);
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
static int error_callback(nghttp2_session *session, const char *msg,
size_t len, void *userp);
#endif
@ -523,7 +523,7 @@ static CURLcode cf_h2_ctx_open(struct Curl_cfilter *cf,
nghttp2_session_callbacks_set_on_begin_headers_callback(
cbs, on_begin_headers);
nghttp2_session_callbacks_set_on_header_callback(cbs, on_header);
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
nghttp2_session_callbacks_set_error_callback(cbs, error_callback);
#endif
@ -1779,7 +1779,7 @@ static ssize_t req_body_read_callback(nghttp2_session *session,
return (nread == 0) ? NGHTTP2_ERR_DEFERRED : nread;
}
#if !defined(CURL_DISABLE_VERBOSE_STRINGS)
#ifndef CURL_DISABLE_VERBOSE_STRINGS
static int error_callback(nghttp2_session *session,
const char *msg,
size_t len,