]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: miscellaneous
authorViktor Szakats <commit@vsz.me>
Tue, 7 Oct 2025 10:49:02 +0000 (12:49 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 24 Oct 2025 22:19:00 +0000 (00:19 +0200)
- cmake/Find*: make double quotes consistent.
- drop redundant parenthesis.
- GHA/checksrc: sync a step name with others.
- whitespace.

Closes #19233

12 files changed:
.github/workflows/checksrc.yml
.github/workflows/non-native.yml
CMake/FindBrotli.cmake
CMake/FindLDAP.cmake
CMake/FindMbedTLS.cmake
CMake/FindNGTCP2.cmake
docs/examples/log_failed_transfers.c
docs/examples/usercertinmem.c
include/curl/curl.h
lib/ldap.c
lib/urldata.h
lib/vauth/ntlm.c

index 05dcc2ec91d6fe213db0c0ef86092b1bdf9a6a2a..c5b918aa8e0a02dcb271ce6288d3b1f0a9a93c26 100644 (file)
@@ -53,7 +53,7 @@ jobs:
         with:
           persist-credentials: false
 
-      - name: 'install'
+      - name: 'install prereqs'
         run: |
           python3 -m venv ~/venv
           ~/venv/bin/pip --disable-pip-version-check --no-input --no-cache-dir install --progress-bar off --prefer-binary \
index 8dccb9e3996401c31e6025721bbbe3ac7cb0527e..71829ec302bde47ef0062ce1ac6b58c886010d4e 100644 (file)
@@ -138,8 +138,8 @@ jobs:
         include:
           - { build: 'autotools', arch: 'x86_64', compiler: 'clang' }
           - { build: 'cmake'    , arch: 'x86_64', compiler: 'clang', options: '-DCMAKE_UNITY_BUILD=OFF', desc: ' !unity !runtests !examples' }
-          - { build: 'autotools', arch: 'arm64', compiler: 'clang' }
-          - { build: 'cmake'    , arch: 'arm64', compiler: 'clang' }
+          - { build: 'autotools', arch: 'arm64' , compiler: 'clang' }
+          - { build: 'cmake'    , arch: 'arm64' , compiler: 'clang' }
       fail-fast: false
     steps:
       - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
index c129a76567c5e01137008948d3f8e8250e8fff14..d2b50d962124d9cdf6b1b87beda83d20130107f3 100644 (file)
@@ -51,7 +51,7 @@ endif()
 
 if(BROTLI_FOUND)
   set(Brotli_FOUND TRUE)
-  set(BROTLI_VERSION "${BROTLI_libbrotlicommon_VERSION}")
+  set(BROTLI_VERSION ${BROTLI_libbrotlicommon_VERSION})
   string(REPLACE ";" " " BROTLI_CFLAGS "${BROTLI_CFLAGS}")
   message(STATUS "Found Brotli (via pkg-config): ${BROTLI_INCLUDE_DIRS} (found version \"${BROTLI_VERSION}\")")
 else()
index 36ff08e397d8496debfe84910c58418ef6b9f9cb..0a897aa13f88d94e2b464976496c0ff27d43b197 100644 (file)
@@ -50,7 +50,7 @@ if(CURL_USE_PKGCONFIG AND
 endif()
 
 if(LDAP_FOUND)
-  set(LDAP_VERSION "${LDAP_ldap_VERSION}")
+  set(LDAP_VERSION ${LDAP_ldap_VERSION})
   string(REPLACE ";" " " LDAP_CFLAGS "${LDAP_CFLAGS}")
   message(STATUS "Found LDAP (via pkg-config): ${LDAP_INCLUDE_DIRS} (found version \"${LDAP_VERSION}\")")
 else()
index e1bee7dc4c1b5a6985d997673bd7949a7fa654b7..11b4f076f4dc1e7e060bec5d7ce1b652a5a4afd7 100644 (file)
@@ -59,7 +59,7 @@ endif()
 
 if(MBEDTLS_FOUND)
   set(MbedTLS_FOUND TRUE)
-  set(MBEDTLS_VERSION "${MBEDTLS_mbedtls_VERSION}")
+  set(MBEDTLS_VERSION ${MBEDTLS_mbedtls_VERSION})
   string(REPLACE ";" " " MBEDTLS_CFLAGS "${MBEDTLS_CFLAGS}")
   message(STATUS "Found MbedTLS (via pkg-config): ${MBEDTLS_INCLUDE_DIRS} (found version \"${MBEDTLS_VERSION}\")")
 else()
index d3d3835213284add1ab57b2c28daf3edb128c676..cda3b0e08cb2d83968549b0a2e83adf712640998 100644 (file)
@@ -86,7 +86,7 @@ if(CURL_USE_PKGCONFIG AND
 endif()
 
 if(NGTCP2_FOUND)
-  set(NGTCP2_VERSION "${NGTCP2_libngtcp2_VERSION}")
+  set(NGTCP2_VERSION ${NGTCP2_libngtcp2_VERSION})
   string(REPLACE ";" " " NGTCP2_CFLAGS "${NGTCP2_CFLAGS}")
   message(STATUS "Found NGTCP2 (via pkg-config): ${NGTCP2_INCLUDE_DIRS} (found version \"${NGTCP2_VERSION}\")")
 else()
index fe5f02f882c83fbd696d274ae7c3a34795843793..9237f69b32ed47d28d5590cf181a77e6f57edeed 100644 (file)
@@ -130,7 +130,7 @@ static int mem_add(struct mem *mem, const char *str)
 }
 
 #if defined(__GNUC__) || defined(__clang__)
-__attribute__ ((format (printf, 2, 3)))
+__attribute__((format(printf, 2, 3)))
 #endif
 static int mem_addf(struct mem *mem, const char *format, ...)
 {
index c53fcde9cbce2146ebdb963c4d47e43b027e7977..0fb5ab0de9de4d7580bd41b8d7d2ab88687e69e3 100644 (file)
@@ -176,9 +176,9 @@ int main(void)
 
     /* both VERIFYPEER and VERIFYHOST are set to 0 in this case because there
        is no CA certificate */
-
     curl_easy_setopt(ch, CURLOPT_SSL_VERIFYPEER, 0L);
     curl_easy_setopt(ch, CURLOPT_SSL_VERIFYHOST, 0L);
+
     curl_easy_setopt(ch, CURLOPT_URL, "https://www.example.com/");
     curl_easy_setopt(ch, CURLOPT_SSLKEYTYPE, "PEM");
 
index 917b10142000a8b24252bfd5f2ca0b40903147d6..9e07527dc9c4b46aad63c41082575f002cbdb9aa 100644 (file)
@@ -401,12 +401,12 @@ typedef int (*curl_seek_callback)(void *instream,
 #define CURL_TRAILERFUNC_ABORT 1
 
 typedef size_t (*curl_read_callback)(char *buffer,
-                                      size_t size,
-                                      size_t nitems,
-                                      void *instream);
+                                     size_t size,
+                                     size_t nitems,
+                                     void *instream);
 
 typedef int (*curl_trailer_callback)(struct curl_slist **list,
-                                      void *userdata);
+                                     void *userdata);
 
 typedef enum {
   CURLSOCKTYPE_IPCXN,  /* socket created for a specific IP connection */
index 322c870bc248c7ffbac8c49e61d1c083d9d4dfe9..8db1f41338b135c2615187d014218e49f7cd15ea 100644 (file)
@@ -399,8 +399,8 @@ static CURLcode ldap_do(struct Curl_easy *data, bool *done)
 #ifdef LDAP_OPT_X_TLS
     if(conn->ssl_config.verifypeer) {
       /* OpenLDAP SDK supports BASE64 files. */
-      if((data->set.ssl.cert_type) &&
-         (!curl_strequal(data->set.ssl.cert_type, "PEM"))) {
+      if(data->set.ssl.cert_type &&
+         !curl_strequal(data->set.ssl.cert_type, "PEM")) {
         failf(data, "LDAP local: ERROR OpenLDAP only supports PEM cert-type");
         result = CURLE_SSL_CERTPROBLEM;
         goto quit;
index c7e19201fe886ceaf7bfb7d8a42434031684083b..19f96bbc17448de9e18661b9d05a994c0c923773 100644 (file)
@@ -419,12 +419,12 @@ struct hostname {
  * Flags on the keepon member of the Curl_transfer_keeper
  */
 
-#define KEEP_NONE  0
-#define KEEP_RECV  (1<<0)     /* there is or may be data to read */
-#define KEEP_SEND (1<<1)     /* there is or may be data to write */
-#define KEEP_RECV_HOLD (1<<2) /* when set, no reading should be done but there
-                                 might still be data to read */
-#define KEEP_SEND_HOLD (1<<3) /* when set, no writing should be done but there
+#define KEEP_NONE       0
+#define KEEP_RECV       (1<<0) /* there is or may be data to read */
+#define KEEP_SEND       (1<<1) /* there is or may be data to write */
+#define KEEP_RECV_HOLD  (1<<2) /* when set, no reading should be done but there
+                                  might still be data to read */
+#define KEEP_SEND_HOLD  (1<<3) /* when set, no writing should be done but there
                                   might still be data to write */
 #define KEEP_RECV_PAUSE (1<<4) /* reading is paused */
 #define KEEP_SEND_PAUSE (1<<5) /* writing is paused */
@@ -543,10 +543,10 @@ struct Curl_handler {
                      followtype type);
 
   int defport;            /* Default port. */
-  curl_prot_t protocol;  /* See CURLPROTO_* - this needs to be the single
-                            specific protocol bit */
-  curl_prot_t family;    /* single bit for protocol family; basically the
-                            non-TLS name of the protocol this is */
+  curl_prot_t protocol;   /* See CURLPROTO_* - this needs to be the single
+                             specific protocol bit */
+  curl_prot_t family;     /* single bit for protocol family; basically the
+                             non-TLS name of the protocol this is */
   unsigned int flags;     /* Extra particular characteristics, see PROTOPT_* */
 
 };
@@ -574,13 +574,13 @@ struct Curl_handler {
 #define PROTOPT_PROXY_AS_HTTP (1<<11) /* allow this non-HTTP scheme over a
                                          HTTP proxy as HTTP proxies may know
                                          this protocol and act as a gateway */
-#define PROTOPT_WILDCARD (1<<12) /* protocol supports wildcard matching */
+#define PROTOPT_WILDCARD (1<<12)    /* protocol supports wildcard matching */
 #define PROTOPT_USERPWDCTRL (1<<13) /* Allow "control bytes" (< 32 ASCII) in
                                        username and password */
-#define PROTOPT_NOTCPPROXY (1<<14) /* this protocol cannot proxy over TCP */
-#define PROTOPT_SSL_REUSE (1<<15)  /* this protocol may reuse an existing
-                                      SSL connection in the same family
-                                      without having PROTOPT_SSL. */
+#define PROTOPT_NOTCPPROXY (1<<14)  /* this protocol cannot proxy over TCP */
+#define PROTOPT_SSL_REUSE (1<<15)   /* this protocol may reuse an existing
+                                       SSL connection in the same family
+                                       without having PROTOPT_SSL. */
 
 #define CONNCHECK_NONE 0                 /* No checks */
 #define CONNCHECK_ISDEAD (1<<0)          /* Check if the connection is dead. */
index 4b793b7cdbb40176632ed4fc805d1c12c3556667..1e9b629d8f499c9ec2acc93c29267b42a7ac149b 100644 (file)
@@ -842,7 +842,7 @@ CURLcode Curl_auth_create_ntlm_type3_message(struct Curl_easy *data,
   result = Curl_bufref_memdup(out, ntlmbuf, size);
 
 error:
-  free(ntlmv2resp);/* Free the dynamic buffer allocated for NTLMv2 */
+  free(ntlmv2resp);  /* Free the dynamic buffer allocated for NTLMv2 */
 
   Curl_auth_cleanup_ntlm(ntlm);