]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: miscellaneous
authorViktor Szakats <commit@vsz.me>
Fri, 13 Feb 2026 00:47:10 +0000 (01:47 +0100)
committerViktor Szakats <commit@vsz.me>
Wed, 25 Feb 2026 13:44:56 +0000 (14:44 +0100)
- vms/curlmsg_vms.h: delete unused/commented code.
- vtls/schannel_verify: sort includes.
- typecheck-gcc.h: fix indent and alignment.
- lib/config-win32.h: drop idle `#undef`.
- spacecheck: check for stray empty lines before after curly braces.
- make literals more readable: 1048576 -> 1024 * 1024
- scope variables.
- use ISO date in a comment.
- drop redundant parentheses.
- drop empty comments.
- unfold lines.
- duplicate/stray spaces in comments.
- fix indent, whitespace, minor typos.

Closes #20690

89 files changed:
CMake/CurlTests.c
CMakeLists.txt
docs/DEPRECATE.md
docs/examples/chkspeed.c
docs/examples/externalsocket.c
docs/examples/getinmemory.c
docs/examples/htmltidy.c
docs/examples/http2-pushinmemory.c
docs/examples/imap-search.c
docs/examples/maxconnects.c
docs/examples/postinmemory.c
docs/examples/sepheaders.c
docs/examples/smtp-expn.c
docs/examples/smtp-vrfy.c
docs/examples/url2file.c
docs/examples/version-check.pl
docs/libcurl/curl_mime_data.md
docs/libcurl/opts/CURLOPT_PROGRESSDATA.md
docs/libcurl/opts/CURLOPT_PROGRESSFUNCTION.md
docs/libcurl/opts/CURLOPT_TLSAUTH_PASSWORD.md
docs/libcurl/opts/CURLOPT_TLSAUTH_TYPE.md
docs/libcurl/opts/CURLOPT_TLSAUTH_USERNAME.md
docs/libcurl/opts/CURLOPT_WRITEFUNCTION.md
docs/libcurl/opts/CURLOPT_XFERINFODATA.md
docs/libcurl/opts/CURLOPT_XFERINFOFUNCTION.md
docs/libcurl/symbols.pl
include/curl/curl.h
include/curl/header.h
include/curl/system.h
include/curl/typecheck-gcc.h
lib/altsvc.c
lib/asyn-ares.c
lib/cfilters.h
lib/config-win32.h
lib/connect.c
lib/curl_addrinfo.c
lib/curl_config-cmake.h.in
lib/curl_printf.h
lib/curl_sasl.h
lib/curlx/timeval.c
lib/escape.h
lib/fake_addrinfo.c
lib/ftp.c
lib/http.c
lib/http2.c
lib/http_aws_sigv4.c
lib/imap.c
lib/mprintf.c
lib/mqtt.c
lib/netrc.c
lib/openldap.c
lib/select.h
lib/sendf.h
lib/setup-vms.h
lib/sha256.c
lib/smb.c
lib/smtp.c
lib/socks.c
lib/socks_sspi.c
lib/system_win32.c
lib/url.c
lib/urldata.h
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vtls/openssl.c
lib/vtls/schannel.c
lib/vtls/schannel_verify.c
lib/vtls/vtls.h
lib/vtls/wolfssl.c
projects/vms/curlmsg_vms.h
scripts/checksrc.pl
scripts/managen
scripts/spacecheck.pl
scripts/top-complexity
src/tool_doswin.c
src/tool_getparam.c
src/tool_parsecfg.c
src/tool_urlglob.c
src/tool_vms.c
tests/libtest/lib2405.c
tests/libtest/mk-lib1521.pl
tests/libtest/test613.pl
tests/memanalyzer.pm
tests/runtests.pl
tests/server/socksd.c
tests/servers.pm
tests/test1139.pl
tests/unit/unit1664.c
tests/unit/unit2600.c

index a06c7701f57b8e5cabdedb06cee5fa48606dbefb..425fb4bb783531706c50f085b208d159c7ae6281 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <fcntl.h>
-/* */
+
 #if defined(sun) || defined(__sun__) || \
   defined(__SUNPRO_C) || defined(__SUNPRO_CC)
 #  if defined(__SVR4) || defined(__srv4__)
@@ -39,7 +39,7 @@
 #if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX41)
 #  define PLATFORM_AIX_V3
 #endif
-/* */
+
 #if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3)
 #error "O_NONBLOCK does not work on this platform"
 #endif
index cb294a8036a79524af8e0d9c1cb36d9064ca755b..b13ba6248c33728906f6f27ab49ae200a8c59a50 100644 (file)
@@ -2335,8 +2335,7 @@ if(NOT CURL_DISABLE_INSTALL)
     FILES_MATCHING PATTERN "*.h")
 
   include(CMakePackageConfigHelpers)
-  write_basic_package_version_file(
-    "${_version_config}"
+  write_basic_package_version_file("${_version_config}"
     VERSION ${_curl_version}
     COMPATIBILITY SameMajorVersion)
   file(READ "${_version_config}" _generated_version_config)
index 79569f86f3d6a98ec4237176ecd18cd51f6741d7..a040842baf48864e6d05111fd84ec87723591f57 100644 (file)
@@ -34,7 +34,7 @@ We remove support for CMake <3.18 in April 2026.
 
 CMake 3.18 was released on 2020-07-15.
 
-## TLS SRP Authentication
+## TLS-SRP Authentication
 
 Transport Layer Security Secure Remote Password is a TLS feature that does not
 work with TLS 1.3 or QUIC and is virtually unused by curl users and in
index f69215da4bd0dbbb76b97b874d797cbcce126fc2..869d9f95c4f1c76159e954ba379584ce13b03ab0 100644 (file)
@@ -172,7 +172,7 @@ int main(int argc, const char *argv[])
     /* specify URL to get */
     curl_easy_setopt(curl, CURLOPT_URL, url);
 
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     /* some servers do not like requests that are made without a user-agent
index 959fbf7f1186b07b5d71784e1b44fc194fe115c1..b35f7aad63b413f7fb14651e89b9836dc67c11e9 100644 (file)
@@ -100,7 +100,7 @@ int main(void)
 {
   CURL *curl;
   CURLcode result;
-  struct sockaddr_in servaddr;  /*  socket address structure  */
+  struct sockaddr_in servaddr;  /* socket address structure */
   curl_socket_t sockfd;
 
   result = curl_global_init(CURL_GLOBAL_ALL);
@@ -141,7 +141,7 @@ int main(void)
     /* no progress meter please */
     curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
 
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     /* call this function to get a socket */
index 1743b203f5242d5955d32114632d8748096ec20c..899704bc5cbb841ba0ccb6e3eea89b8058c8f46a 100644 (file)
@@ -78,7 +78,7 @@ int main(void)
     /* specify URL to get */
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.com/");
 
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     /* we pass our 'chunk' struct to the callback function */
index c73e5385e96a2302b596536fd21764dcacf7558e..2e2def59c3c455fcc9513e993b21e12fe927aa1b 100644 (file)
@@ -35,7 +35,7 @@
 
 #include <curl/curl.h>
 
-/* curl write callback, to fill tidy's input buffer...  */
+/* curl write callback, to fill tidy's input buffer... */
 static uint write_cb(char *in, uint size, uint nmemb, TidyBuffer *out)
 {
   uint r;
index e99fe746d058c6dd5505a9c48157955dd6dffbb8..f52309561fb498d12c32406ddcb604c1bacf1d8e 100644 (file)
@@ -77,7 +77,7 @@ static void setup(CURL *curl)
   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0L);
   curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0L);
 
-  /* write data to a struct  */
+  /* write data to a struct */
   curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
   init_memory(&files[0]);
   curl_easy_setopt(curl, CURLOPT_WRITEDATA, &files[0]);
index f06f6a551d7302d9d1063af1a82f0e44e9d83f52..ae944bb9ecfe3a43edebcf9aeefa0fc615aabb97 100644 (file)
@@ -56,7 +56,7 @@ int main(void)
      * this can contain a message sequence set and a number of search criteria
      * keywords including flags such as ANSWERED, DELETED, DRAFT, FLAGGED, NEW,
      * RECENT and SEEN. For more information about the search criteria please
-     * see RFC-3501 section 6.4.4.   */
+     * see RFC-3501 section 6.4.4. */
     curl_easy_setopt(curl, CURLOPT_CUSTOMREQUEST, "SEARCH NEW");
 
     /* Perform the custom request */
index 3c6f3c8b3d0ac2770fad084b722b926fe8902db7..7ef29828eab93aaffc35e15e28fc2648ad2d0b94 100644 (file)
@@ -47,7 +47,7 @@ int main(void)
     };
     int i = 0;
 
-    /* Change the maximum number of persistent connection   */
+    /* Change the maximum number of persistent connection */
     curl_easy_setopt(curl, CURLOPT_MAXCONNECTS, 1L);
 
     curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
index 5b3251f506531bcad3410530d7882380d2addb9d..16fabb8d22f47ff13634eafb9923ae37a43e9ccb 100644 (file)
@@ -74,7 +74,7 @@ int main(void)
   if(curl) {
     curl_easy_setopt(curl, CURLOPT_URL, "https://www.example.org/");
 
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     /* we pass our 'chunk' struct to the callback function */
index e300205223893068c94dc157af3ccd7ae1510437..a315766d901278241efe41e0798fcbd1005931b6 100644 (file)
@@ -64,7 +64,7 @@ int main(void)
     /* no progress meter please */
     curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
 
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     /* open the header file */
index 42a7480625d25fcbf6496724680e8a1cadff6776..25b560f3ecde0ec113e2828dd298c16b9387bc17 100644 (file)
@@ -53,7 +53,7 @@ int main(void)
     /* This is the URL for your mailserver */
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
 
-    /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array  */
+    /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
     recipients = curl_slist_append(recipients, "Friends");
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
index b60dfef25e589c6b6beef764320cf8c821ec3399..65783d690317fb82e0c5703f40121e22ae466fbe 100644 (file)
@@ -56,7 +56,7 @@ int main(void)
     /* This is the URL for your mailserver */
     curl_easy_setopt(curl, CURLOPT_URL, "smtp://mail.example.com");
 
-    /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array  */
+    /* Note that the CURLOPT_MAIL_RCPT takes a list, not a char array */
     recipients = curl_slist_append(recipients, "<recipient@example.com>");
     curl_easy_setopt(curl, CURLOPT_MAIL_RCPT, recipients);
 
index 9ff0dd4fca32292c0c1b31b24677eca3ec6caa3a..d8710830739ef3d24fa8c3cb77840bdf485e29e0 100644 (file)
@@ -74,7 +74,7 @@ int main(int argc, const char *argv[])
     /* disable progress meter, set to 0L to enable it */
     curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1L);
 
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_cb);
 
     /* open the file */
index bc065770bc6eddd56d01867382ce4dd5b102b359..e6ad784fc811ae7c3a323000d6e815be539b43c6 100755 (executable)
@@ -58,7 +58,6 @@ while(<S>) {
             $rem{$sym}=$a[2];
         }
     }
-
 }
 
 close(S);
index 9af7a91d8a8362868cd6893cba0c26a6bc14a153..a03f6b555b23bdc315f13cc4a316ce03fcb8f55a 100644 (file)
@@ -68,7 +68,7 @@ int main(void)
     /* add a part */
     part = curl_mime_addpart(mime);
 
-    /* add data to the part  */
+    /* add data to the part */
     curl_mime_data(part, "raw contents to send", CURL_ZERO_TERMINATED);
   }
 }
index d86210b3e2c6dcb2aa23d666cac58d673414eaa1..c8f59321ca984780d7b26e33297898548ac886bb 100644 (file)
@@ -63,7 +63,7 @@ int main(void)
   if(curl) {
     struct progress data;
 
-    /* pass struct to callback  */
+    /* pass struct to callback */
     curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
     curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
 
index 5334edbe22247891fe8332d57023d6c6b1f3b878..47718002da325b0c0696827b0d3e6a577ad98ce7 100644 (file)
@@ -109,7 +109,7 @@ int main(void)
 
   CURL *curl = curl_easy_init();
   if(curl) {
-    /* pass struct to callback  */
+    /* pass struct to callback */
     curl_easy_setopt(curl, CURLOPT_PROGRESSDATA, &data);
     curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_callback);
 
index 8ff3d95c582dc95684383394e0080fb7dc5b7368..89dd79ebc94676f30e36fc3f3b8a6e86a926fba6 100644 (file)
@@ -41,7 +41,7 @@ option.
 Using this option multiple times makes the last set string override the
 previous ones. Set it to NULL to disable its use again.
 
-This feature relies on TLS SRP which does not work with TLS 1.3.
+This feature relies on TLS-SRP which does not work with TLS 1.3.
 
 # DEFAULT
 
index 078c41c253d2f2ff996371045cbd83e18f54b8c9..35ae6bf4674caf972a81f0eb0ecfe5931281bda3 100644 (file)
@@ -45,7 +45,7 @@ defined in RFC 5054 and provides mutual authentication if both sides have a
 shared secret. To use TLS-SRP, you must also set the
 CURLOPT_TLSAUTH_USERNAME(3) and CURLOPT_TLSAUTH_PASSWORD(3) options.
 
-TLS SRP does not work with TLS 1.3.
+TLS-SRP does not work with TLS 1.3.
 
 # DEFAULT
 
index 654d858f8339047b23dbc320f922002c952857ea..b1d352e80e957365a67f20c40b3b5c0d62050970 100644 (file)
@@ -40,7 +40,7 @@ option.
 Using this option multiple times makes the last set string override the
 previous ones. Set it to NULL to disable its use again.
 
-This feature relies on TLS SRP which does not work with TLS 1.3.
+This feature relies on TLS-SRP which does not work with TLS 1.3.
 
 # DEFAULT
 
index 8cc97a6e40cd9fd28ff28570ea4061784f85429d..407484debb279bd4472c3bc8e4ffe9d86e701d90 100644 (file)
@@ -110,7 +110,7 @@ int main(void)
   CURLcode result;
   CURL *curl = curl_easy_init();
   if(curl) {
-    /* send all data to this function  */
+    /* send all data to this function */
     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cb);
 
     /* we pass our 'chunk' struct to the callback function */
index 3cc0ddd1ca31b932f57ac35a3a64d2dbb5e78c14..5099e0a469442f8864033a7b6b7384d318ce7ea4 100644 (file)
@@ -65,7 +65,7 @@ int main(void)
   if(curl) {
     struct progress data;
 
-    /* pass struct to callback  */
+    /* pass struct to callback */
     curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &data);
     curl_easy_setopt(curl, CURLOPT_XFERINFOFUNCTION, progress_cb);
   }
index 67f48afcb2b7cd7fdd066effba0fdc04d1645e4a..161be8fd4b3d4f404d2b7083c78f2c04ff8482c0 100644 (file)
@@ -105,7 +105,7 @@ int main(void)
   if(curl) {
     struct progress data;
 
-    /* pass struct to callback  */
+    /* pass struct to callback */
     curl_easy_setopt(curl, CURLOPT_XFERINFODATA, &data);
 
     /* enable progress callback getting called */
index d20554ab9391304e3e0b1f0259dc9af76b3589a9..4126fe54e1a673a17f3661d82188d264e608435f 100755 (executable)
@@ -100,6 +100,5 @@ EOS
 EOS
 ;
         }
-
     }
 }
index 99b517adb3cee56f1aadd9be9bcdc6ba8de00f88..632333d799e74d6125086fc7b47c18114d40ec58 100644 (file)
@@ -59,7 +59,7 @@
 #define CURL_IGNORE_DEPRECATION(statements)     statements
 #endif
 
-#include "curlver.h"         /* libcurl version defines   */
+#include "curlver.h"         /* libcurl version defines */
 #include "system.h"          /* determine things runtime */
 
 #include <stdio.h>
@@ -1358,7 +1358,7 @@ typedef enum {
 
   /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
    * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
-   * is set but does not match one of these, 'private' will be used.  */
+   * is set but does not match one of these, 'private' will be used. */
   CURLOPTDEPRECATED(CURLOPT_KRBLEVEL, CURLOPTTYPE_STRINGPOINT, 63,
                     8.17.0, "removed"),
 
@@ -2203,7 +2203,7 @@ typedef enum {
   CURLOPT(CURLOPT_SSH_HOST_PUBLIC_KEY_SHA256, CURLOPTTYPE_STRINGPOINT, 311),
 
   /* Function that will be called immediately before the initial request
-     is made on a connection (after any protocol negotiation step).  */
+     is made on a connection (after any protocol negotiation step). */
   CURLOPT(CURLOPT_PREREQFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 312),
 
   /* Data passed to the CURLOPT_PREREQFUNCTION callback */
@@ -2283,7 +2283,6 @@ typedef enum {
 #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
 #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL
 
-/* */
 #define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT
 
 /* Added in 8.2.0 */
@@ -3310,7 +3309,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
 #endif
 
 /* unfortunately, the easy.h and multi.h include files need options and info
-  stuff before they can be included! */
+   stuff before they can be included! */
 #include "easy.h" /* nothing in curl is fun without the easy stuff */
 #include "multi.h"
 #include "urlapi.h"
@@ -3330,7 +3329,7 @@ CURL_EXTERN CURLcode curl_easy_ssls_export(CURL *handle,
 /* This preprocessor magic that replaces a call with the exact same call is
    only done to make sure application authors pass exactly three arguments
    to these functions. Use recursive macros to allow using these symbols via
-   the C++ global namespace '::' or reuse them as method names. */
+   the C++ global namespace '::' or reusing them as method names. */
 #define curl_easy_setopt(handle, opt, param) \
   curl_easy_setopt(handle, opt, param)
 #define curl_easy_getinfo(handle, info, arg) \
index e7334b5a3a4d35f9d23fc47a4d9826370b0dc0c5..85c10c8d7833211bab237dac62a21fdc7f91cff9 100644 (file)
@@ -31,7 +31,7 @@ extern "C" {
 struct curl_header {
   char *name;    /* this might not use the same case */
   char *value;
-  size_t amount; /* number of headers using this name  */
+  size_t amount; /* number of headers using this name */
   size_t index;  /* ... of this instance, 0 or higher */
   unsigned int origin; /* see bits below */
   void *anchor; /* handle privately used by libcurl */
index a5b3e9eba79a055c4c300b1d5d516678e5fbe693..064833d6e1e72385ed9e493513c1a2d8219c6443 100644 (file)
 #define CURL_PULL_SYS_POLL_H
 #endif
 
-/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file  */
-/* sys/types.h is required here to properly make type definitions below. */
+/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file
+   sys/types.h is required here to properly make type definitions below. */
 #ifdef CURL_PULL_SYS_TYPES_H
 #  include <sys/types.h>
 #endif
 
-/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file  */
-/* sys/socket.h is required here to properly make type definitions below. */
+/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file
+   sys/socket.h is required here to properly make type definitions below. */
 #ifdef CURL_PULL_SYS_SOCKET_H
 #  include <sys/socket.h>
 #endif
 
-/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file    */
-/* sys/poll.h is required here to properly make type definitions below.   */
+/* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file
+   sys/poll.h is required here to properly make type definitions below. */
 #ifdef CURL_PULL_SYS_POLL_H
 #  include <sys/poll.h>
 #endif
index 7e6ef5baf4cc099737299cda11440670164207ec..3ac3182c507e5e9ef89de267e3e1913b30debd96 100644 (file)
 
 #define curl_easy_setopt(handle, option, value)                         \
   __extension__({                                                       \
-      if(__builtin_constant_p(option)) {                                \
-        CURL_IGNORE_DEPRECATION(                                        \
-          if(curlcheck_long_option(option))                             \
-            if(!curlcheck_long(value))                                  \
-              Wcurl_easy_setopt_err_long();                             \
-          if(curlcheck_off_t_option(option))                            \
-            if(!curlcheck_off_t(value))                                 \
-              Wcurl_easy_setopt_err_curl_off_t();                       \
-          if(curlcheck_string_option(option))                           \
-            if(!curlcheck_string(value))                                \
-              Wcurl_easy_setopt_err_string();                           \
-          if((option) == CURLOPT_PRIVATE) { }                           \
-          if(curlcheck_write_cb_option(option))                         \
-            if(!curlcheck_write_cb(value))                              \
-              Wcurl_easy_setopt_err_write_callback();                   \
-          if(curlcheck_curl_option(option))                             \
-            if(!curlcheck_curl(value))                                  \
-              Wcurl_easy_setopt_err_curl();                             \
-          if((option) == CURLOPT_RESOLVER_START_FUNCTION)               \
-            if(!curlcheck_resolver_start_callback(value))               \
-              Wcurl_easy_setopt_err_resolver_start_callback();          \
-          if((option) == CURLOPT_READFUNCTION)                          \
-            if(!curlcheck_read_cb(value))                               \
-              Wcurl_easy_setopt_err_read_cb();                          \
-          if((option) == CURLOPT_IOCTLFUNCTION)                         \
-            if(!curlcheck_ioctl_cb(value))                              \
-              Wcurl_easy_setopt_err_ioctl_cb();                         \
-          if((option) == CURLOPT_SOCKOPTFUNCTION)                       \
-            if(!curlcheck_sockopt_cb(value))                            \
-              Wcurl_easy_setopt_err_sockopt_cb();                       \
-          if((option) == CURLOPT_OPENSOCKETFUNCTION)                    \
-            if(!curlcheck_opensocket_cb(value))                         \
-              Wcurl_easy_setopt_err_opensocket_cb();                    \
-          if((option) == CURLOPT_PROGRESSFUNCTION)                      \
-            if(!curlcheck_progress_cb(value))                           \
-              Wcurl_easy_setopt_err_progress_cb();                      \
-          if((option) == CURLOPT_XFERINFOFUNCTION)                      \
-            if(!curlcheck_xferinfo_cb(value))                           \
-              Wcurl_easy_setopt_err_xferinfo_cb();                      \
-          if((option) == CURLOPT_DEBUGFUNCTION)                         \
-            if(!curlcheck_debug_cb(value))                              \
-              Wcurl_easy_setopt_err_debug_cb();                         \
-          if((option) == CURLOPT_SSL_CTX_FUNCTION)                      \
-            if(!curlcheck_ssl_ctx_cb(value))                            \
-              Wcurl_easy_setopt_err_ssl_ctx_cb();                       \
-          if(curlcheck_conv_cb_option(option))                          \
-            if(!curlcheck_conv_cb(value))                               \
-              Wcurl_easy_setopt_err_conv_cb();                          \
-          if((option) == CURLOPT_SEEKFUNCTION)                          \
-            if(!curlcheck_seek_cb(value))                               \
-              Wcurl_easy_setopt_err_seek_cb();                          \
-          if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                    \
-            if(!curlcheck_chunk_bgn_cb(value))                          \
-              Wcurl_easy_setopt_err_chunk_bgn_cb();                     \
-          if((option) == CURLOPT_CHUNK_END_FUNCTION)                    \
-            if(!curlcheck_chunk_end_cb(value))                          \
-              Wcurl_easy_setopt_err_chunk_end_cb();                     \
-          if((option) == CURLOPT_CLOSESOCKETFUNCTION)                   \
-            if(!curlcheck_close_socket_cb(value))                       \
-              Wcurl_easy_setopt_err_close_socket_cb();                  \
-          if((option) == CURLOPT_FNMATCH_FUNCTION)                      \
-            if(!curlcheck_fnmatch_cb(value))                            \
-              Wcurl_easy_setopt_err_fnmatch_cb();                       \
-          if((option) == CURLOPT_HSTSREADFUNCTION)                      \
-            if(!curlcheck_hstsread_cb(value))                           \
-              Wcurl_easy_setopt_err_hstsread_cb();                      \
-          if((option) == CURLOPT_HSTSWRITEFUNCTION)                     \
-            if(!curlcheck_hstswrite_cb(value))                          \
-              Wcurl_easy_setopt_err_hstswrite_cb();                     \
-          if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                   \
-            if(!curlcheck_ssh_hostkey_cb(value))                        \
-              Wcurl_easy_setopt_err_ssh_hostkey_cb();                   \
-          if((option) == CURLOPT_SSH_KEYFUNCTION)                       \
-            if(!curlcheck_ssh_key_cb(value))                            \
-              Wcurl_easy_setopt_err_ssh_key_cb();                       \
-          if((option) == CURLOPT_INTERLEAVEFUNCTION)                    \
-            if(!curlcheck_interleave_cb(value))                         \
-              Wcurl_easy_setopt_err_interleave_cb();                    \
-          if((option) == CURLOPT_PREREQFUNCTION)                        \
-            if(!curlcheck_prereq_cb(value))                             \
-              Wcurl_easy_setopt_err_prereq_cb();                        \
-          if((option) == CURLOPT_TRAILERFUNCTION)                       \
-            if(!curlcheck_trailer_cb(value))                            \
-              Wcurl_easy_setopt_err_trailer_cb();                       \
-          if(curlcheck_cb_data_option(option))                          \
-            if(!curlcheck_cb_data(value))                               \
-              Wcurl_easy_setopt_err_cb_data();                          \
-          if((option) == CURLOPT_ERRORBUFFER)                           \
-            if(!curlcheck_error_buffer(value))                          \
-              Wcurl_easy_setopt_err_error_buffer();                     \
-          if((option) == CURLOPT_CURLU)                                 \
-            if(!curlcheck_ptr((value), CURLU))                          \
-              Wcurl_easy_setopt_err_curlu();                            \
-          if((option) == CURLOPT_STDERR)                                \
-            if(!curlcheck_FILE(value))                                  \
-              Wcurl_easy_setopt_err_FILE();                             \
-          if(curlcheck_postfields_option(option))                       \
-            if(!curlcheck_postfields(value))                            \
-              Wcurl_easy_setopt_err_postfields();                       \
-          if((option) == CURLOPT_HTTPPOST)                              \
-            if(!curlcheck_arr((value), struct curl_httppost))           \
-              Wcurl_easy_setopt_err_curl_httpost();                     \
-          if((option) == CURLOPT_MIMEPOST)                              \
-            if(!curlcheck_ptr((value), curl_mime))                      \
-              Wcurl_easy_setopt_err_curl_mimepost();                    \
-          if(curlcheck_slist_option(option))                            \
-            if(!curlcheck_arr((value), struct curl_slist))              \
-              Wcurl_easy_setopt_err_curl_slist();                       \
-          if((option) == CURLOPT_SHARE)                                 \
-            if(!curlcheck_ptr((value), CURLSH))                         \
-              Wcurl_easy_setopt_err_CURLSH();                           \
-          )                                                             \
-          }                                                             \
-      (curl_easy_setopt)(handle, option, value);                        \
-    })
+    if(__builtin_constant_p(option)) {                                  \
+      CURL_IGNORE_DEPRECATION(                                          \
+        if(curlcheck_long_option(option))                               \
+          if(!curlcheck_long(value))                                    \
+            Wcurl_easy_setopt_err_long();                               \
+        if(curlcheck_off_t_option(option))                              \
+          if(!curlcheck_off_t(value))                                   \
+            Wcurl_easy_setopt_err_curl_off_t();                         \
+        if(curlcheck_string_option(option))                             \
+          if(!curlcheck_string(value))                                  \
+            Wcurl_easy_setopt_err_string();                             \
+        if((option) == CURLOPT_PRIVATE) { }                             \
+        if(curlcheck_write_cb_option(option))                           \
+          if(!curlcheck_write_cb(value))                                \
+            Wcurl_easy_setopt_err_write_callback();                     \
+        if(curlcheck_curl_option(option))                               \
+          if(!curlcheck_curl(value))                                    \
+            Wcurl_easy_setopt_err_curl();                               \
+        if((option) == CURLOPT_RESOLVER_START_FUNCTION)                 \
+          if(!curlcheck_resolver_start_callback(value))                 \
+            Wcurl_easy_setopt_err_resolver_start_callback();            \
+        if((option) == CURLOPT_READFUNCTION)                            \
+          if(!curlcheck_read_cb(value))                                 \
+            Wcurl_easy_setopt_err_read_cb();                            \
+        if((option) == CURLOPT_IOCTLFUNCTION)                           \
+          if(!curlcheck_ioctl_cb(value))                                \
+            Wcurl_easy_setopt_err_ioctl_cb();                           \
+        if((option) == CURLOPT_SOCKOPTFUNCTION)                         \
+          if(!curlcheck_sockopt_cb(value))                              \
+            Wcurl_easy_setopt_err_sockopt_cb();                         \
+        if((option) == CURLOPT_OPENSOCKETFUNCTION)                      \
+          if(!curlcheck_opensocket_cb(value))                           \
+            Wcurl_easy_setopt_err_opensocket_cb();                      \
+        if((option) == CURLOPT_PROGRESSFUNCTION)                        \
+          if(!curlcheck_progress_cb(value))                             \
+            Wcurl_easy_setopt_err_progress_cb();                        \
+        if((option) == CURLOPT_XFERINFOFUNCTION)                        \
+          if(!curlcheck_xferinfo_cb(value))                             \
+            Wcurl_easy_setopt_err_xferinfo_cb();                        \
+        if((option) == CURLOPT_DEBUGFUNCTION)                           \
+          if(!curlcheck_debug_cb(value))                                \
+            Wcurl_easy_setopt_err_debug_cb();                           \
+        if((option) == CURLOPT_SSL_CTX_FUNCTION)                        \
+          if(!curlcheck_ssl_ctx_cb(value))                              \
+            Wcurl_easy_setopt_err_ssl_ctx_cb();                         \
+        if(curlcheck_conv_cb_option(option))                            \
+          if(!curlcheck_conv_cb(value))                                 \
+            Wcurl_easy_setopt_err_conv_cb();                            \
+        if((option) == CURLOPT_SEEKFUNCTION)                            \
+          if(!curlcheck_seek_cb(value))                                 \
+            Wcurl_easy_setopt_err_seek_cb();                            \
+        if((option) == CURLOPT_CHUNK_BGN_FUNCTION)                      \
+          if(!curlcheck_chunk_bgn_cb(value))                            \
+            Wcurl_easy_setopt_err_chunk_bgn_cb();                       \
+        if((option) == CURLOPT_CHUNK_END_FUNCTION)                      \
+          if(!curlcheck_chunk_end_cb(value))                            \
+            Wcurl_easy_setopt_err_chunk_end_cb();                       \
+        if((option) == CURLOPT_CLOSESOCKETFUNCTION)                     \
+          if(!curlcheck_close_socket_cb(value))                         \
+            Wcurl_easy_setopt_err_close_socket_cb();                    \
+        if((option) == CURLOPT_FNMATCH_FUNCTION)                        \
+          if(!curlcheck_fnmatch_cb(value))                              \
+            Wcurl_easy_setopt_err_fnmatch_cb();                         \
+        if((option) == CURLOPT_HSTSREADFUNCTION)                        \
+          if(!curlcheck_hstsread_cb(value))                             \
+            Wcurl_easy_setopt_err_hstsread_cb();                        \
+        if((option) == CURLOPT_HSTSWRITEFUNCTION)                       \
+          if(!curlcheck_hstswrite_cb(value))                            \
+            Wcurl_easy_setopt_err_hstswrite_cb();                       \
+        if((option) == CURLOPT_SSH_HOSTKEYFUNCTION)                     \
+          if(!curlcheck_ssh_hostkey_cb(value))                          \
+            Wcurl_easy_setopt_err_ssh_hostkey_cb();                     \
+        if((option) == CURLOPT_SSH_KEYFUNCTION)                         \
+          if(!curlcheck_ssh_key_cb(value))                              \
+            Wcurl_easy_setopt_err_ssh_key_cb();                         \
+        if((option) == CURLOPT_INTERLEAVEFUNCTION)                      \
+          if(!curlcheck_interleave_cb(value))                           \
+            Wcurl_easy_setopt_err_interleave_cb();                      \
+        if((option) == CURLOPT_PREREQFUNCTION)                          \
+          if(!curlcheck_prereq_cb(value))                               \
+            Wcurl_easy_setopt_err_prereq_cb();                          \
+        if((option) == CURLOPT_TRAILERFUNCTION)                         \
+          if(!curlcheck_trailer_cb(value))                              \
+            Wcurl_easy_setopt_err_trailer_cb();                         \
+        if(curlcheck_cb_data_option(option))                            \
+          if(!curlcheck_cb_data(value))                                 \
+            Wcurl_easy_setopt_err_cb_data();                            \
+        if((option) == CURLOPT_ERRORBUFFER)                             \
+          if(!curlcheck_error_buffer(value))                            \
+            Wcurl_easy_setopt_err_error_buffer();                       \
+        if((option) == CURLOPT_CURLU)                                   \
+          if(!curlcheck_ptr((value), CURLU))                            \
+            Wcurl_easy_setopt_err_curlu();                              \
+        if((option) == CURLOPT_STDERR)                                  \
+          if(!curlcheck_FILE(value))                                    \
+            Wcurl_easy_setopt_err_FILE();                               \
+        if(curlcheck_postfields_option(option))                         \
+          if(!curlcheck_postfields(value))                              \
+            Wcurl_easy_setopt_err_postfields();                         \
+        if((option) == CURLOPT_HTTPPOST)                                \
+          if(!curlcheck_arr((value), struct curl_httppost))             \
+            Wcurl_easy_setopt_err_curl_httpost();                       \
+        if((option) == CURLOPT_MIMEPOST)                                \
+          if(!curlcheck_ptr((value), curl_mime))                        \
+            Wcurl_easy_setopt_err_curl_mimepost();                      \
+        if(curlcheck_slist_option(option))                              \
+          if(!curlcheck_arr((value), struct curl_slist))                \
+            Wcurl_easy_setopt_err_curl_slist();                         \
+        if((option) == CURLOPT_SHARE)                                   \
+          if(!curlcheck_ptr((value), CURLSH))                           \
+            Wcurl_easy_setopt_err_CURLSH();                             \
+      )                                                                 \
+    }                                                                   \
+    (curl_easy_setopt)(handle, option, value);                          \
+  })
 
 /* wraps curl_easy_getinfo() with type checking */
 #define curl_easy_getinfo(handle, info, arg)                            \
   __extension__({                                                       \
-      if(__builtin_constant_p(info)) {                                  \
-        CURL_IGNORE_DEPRECATION(                                        \
-          if(curlcheck_string_info(info))                               \
-            if(!curlcheck_arr((arg), char *))                           \
-              Wcurl_easy_getinfo_err_string();                          \
-          if(curlcheck_long_info(info))                                 \
-            if(!curlcheck_arr((arg), long))                             \
-              Wcurl_easy_getinfo_err_long();                            \
-          if(curlcheck_double_info(info))                               \
-            if(!curlcheck_arr((arg), double))                           \
-              Wcurl_easy_getinfo_err_double();                          \
-          if(curlcheck_slist_info(info))                                \
-            if(!curlcheck_arr((arg), struct curl_slist *))              \
-              Wcurl_easy_getinfo_err_curl_slist();                      \
-          if(curlcheck_tlssessioninfo_info(info))                       \
-            if(!curlcheck_arr((arg), struct curl_tlssessioninfo *))     \
-              Wcurl_easy_getinfo_err_curl_tlssessioninfo();             \
-          if(curlcheck_certinfo_info(info))                             \
-            if(!curlcheck_arr((arg), struct curl_certinfo *))           \
-              Wcurl_easy_getinfo_err_curl_certinfo();                   \
-          if(curlcheck_socket_info(info))                               \
-            if(!curlcheck_arr((arg), curl_socket_t))                    \
-              Wcurl_easy_getinfo_err_curl_socket();                     \
-          if(curlcheck_off_t_info(info))                                \
-            if(!curlcheck_arr((arg), curl_off_t))                       \
-              Wcurl_easy_getinfo_err_curl_off_t();                      \
-          )                                                             \
-          }                                                             \
-      (curl_easy_getinfo)(handle, info, arg);                           \
-    })
+    if(__builtin_constant_p(info)) {                                    \
+      CURL_IGNORE_DEPRECATION(                                          \
+        if(curlcheck_string_info(info))                                 \
+          if(!curlcheck_arr((arg), char *))                             \
+            Wcurl_easy_getinfo_err_string();                            \
+        if(curlcheck_long_info(info))                                   \
+          if(!curlcheck_arr((arg), long))                               \
+            Wcurl_easy_getinfo_err_long();                              \
+        if(curlcheck_double_info(info))                                 \
+          if(!curlcheck_arr((arg), double))                             \
+            Wcurl_easy_getinfo_err_double();                            \
+        if(curlcheck_slist_info(info))                                  \
+          if(!curlcheck_arr((arg), struct curl_slist *))                \
+            Wcurl_easy_getinfo_err_curl_slist();                        \
+        if(curlcheck_tlssessioninfo_info(info))                         \
+          if(!curlcheck_arr((arg), struct curl_tlssessioninfo *))       \
+            Wcurl_easy_getinfo_err_curl_tlssessioninfo();               \
+        if(curlcheck_certinfo_info(info))                               \
+          if(!curlcheck_arr((arg), struct curl_certinfo *))             \
+            Wcurl_easy_getinfo_err_curl_certinfo();                     \
+        if(curlcheck_socket_info(info))                                 \
+          if(!curlcheck_arr((arg), curl_socket_t))                      \
+            Wcurl_easy_getinfo_err_curl_socket();                       \
+        if(curlcheck_off_t_info(info))                                  \
+          if(!curlcheck_arr((arg), curl_off_t))                         \
+            Wcurl_easy_getinfo_err_curl_off_t();                        \
+      )                                                                 \
+    }                                                                   \
+    (curl_easy_getinfo)(handle, info, arg);                             \
+  })
 
 #define curl_multi_setopt(handle, option, value)                        \
   __extension__({                                                       \
-      if(__builtin_constant_p(option)) {                                \
-        if(curlcheck_long_option(option))                               \
-          if(!curlcheck_long(value))                                    \
-            Wcurl_multi_setopt_err_long();                              \
-        if(curlcheck_off_t_option(option))                              \
-          if(!curlcheck_off_t(value))                                   \
-            Wcurl_multi_setopt_err_curl_off_t();                        \
-        if(curlcheck_multicb_data_option(option))                       \
-          if(!curlcheck_cb_data(value))                                 \
-            Wcurl_multi_setopt_err_cb_data();                           \
-        if(curlcheck_charpp_option(option))                             \
-          if(!curlcheck_ptrptr(value, char))                            \
-            Wcurl_multi_setopt_err_charpp();                            \
-        if((option) == CURLMOPT_NOTIFYFUNCTION)                         \
-          if(!curlcheck_multinotify_cb(value))                          \
-            Wcurl_multi_setopt_err_notifycb();                          \
-        if((option) == CURLMOPT_PUSHFUNCTION)                           \
-          if(!curlcheck_multipush_cb(value))                            \
-            Wcurl_multi_setopt_err_pushcb();                            \
-        if((option) == CURLMOPT_SOCKETFUNCTION)                         \
-          if(!curlcheck_multisocket_cb(value))                          \
-            Wcurl_multi_setopt_err_socketcb();                          \
-        if((option) == CURLMOPT_TIMERFUNCTION)                          \
-          if(!curlcheck_multitimer_cb(value))                           \
-            Wcurl_multi_setopt_err_timercb();                           \
-      }                                                                 \
-      (curl_multi_setopt)(handle, option, value);                       \
-    })
+    if(__builtin_constant_p(option)) {                                  \
+      if(curlcheck_long_option(option))                                 \
+        if(!curlcheck_long(value))                                      \
+          Wcurl_multi_setopt_err_long();                                \
+      if(curlcheck_off_t_option(option))                                \
+        if(!curlcheck_off_t(value))                                     \
+          Wcurl_multi_setopt_err_curl_off_t();                          \
+      if(curlcheck_multicb_data_option(option))                         \
+        if(!curlcheck_cb_data(value))                                   \
+          Wcurl_multi_setopt_err_cb_data();                             \
+      if(curlcheck_charpp_option(option))                               \
+        if(!curlcheck_ptrptr(value, char))                              \
+          Wcurl_multi_setopt_err_charpp();                              \
+      if((option) == CURLMOPT_NOTIFYFUNCTION)                           \
+        if(!curlcheck_multinotify_cb(value))                            \
+          Wcurl_multi_setopt_err_notifycb();                            \
+      if((option) == CURLMOPT_PUSHFUNCTION)                             \
+        if(!curlcheck_multipush_cb(value))                              \
+          Wcurl_multi_setopt_err_pushcb();                              \
+      if((option) == CURLMOPT_SOCKETFUNCTION)                           \
+        if(!curlcheck_multisocket_cb(value))                            \
+          Wcurl_multi_setopt_err_socketcb();                            \
+      if((option) == CURLMOPT_TIMERFUNCTION)                            \
+        if(!curlcheck_multitimer_cb(value))                             \
+          Wcurl_multi_setopt_err_timercb();                             \
+    }                                                                   \
+    (curl_multi_setopt)(handle, option, value);                         \
+  })
 
 /* evaluates to true if the option takes a data argument to pass to a
    callback */
@@ -512,82 +512,84 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
    (option) == CURLOPT_CONV_FROM_UTF8_FUNCTION)
 
 /* evaluates to true if option takes a data argument to pass to a callback */
-#define curlcheck_cb_data_option(option)                                      \
-  ((option) == CURLOPT_CHUNK_DATA ||                                          \
-   (option) == CURLOPT_CLOSESOCKETDATA ||                                     \
-   (option) == CURLOPT_DEBUGDATA ||                                           \
-   (option) == CURLOPT_FNMATCH_DATA ||                                        \
-   (option) == CURLOPT_HEADERDATA ||                                          \
-   (option) == CURLOPT_HSTSREADDATA ||                                        \
-   (option) == CURLOPT_HSTSWRITEDATA ||                                       \
-   (option) == CURLOPT_INTERLEAVEDATA ||                                      \
-   (option) == CURLOPT_IOCTLDATA ||                                           \
-   (option) == CURLOPT_OPENSOCKETDATA ||                                      \
-   (option) == CURLOPT_PREREQDATA ||                                          \
-   (option) == CURLOPT_XFERINFODATA ||                                        \
-   (option) == CURLOPT_READDATA ||                                            \
-   (option) == CURLOPT_SEEKDATA ||                                            \
-   (option) == CURLOPT_SOCKOPTDATA ||                                         \
-   (option) == CURLOPT_SSH_KEYDATA ||                                         \
-   (option) == CURLOPT_SSL_CTX_DATA ||                                        \
-   (option) == CURLOPT_WRITEDATA ||                                           \
-   (option) == CURLOPT_RESOLVER_START_DATA ||                                 \
-   (option) == CURLOPT_TRAILERDATA ||                                         \
-   (option) == CURLOPT_SSH_HOSTKEYDATA ||                                     \
+#define curlcheck_cb_data_option(option)                                \
+  ((option) == CURLOPT_CHUNK_DATA ||                                    \
+   (option) == CURLOPT_CLOSESOCKETDATA ||                               \
+   (option) == CURLOPT_DEBUGDATA ||                                     \
+   (option) == CURLOPT_FNMATCH_DATA ||                                  \
+   (option) == CURLOPT_HEADERDATA ||                                    \
+   (option) == CURLOPT_HSTSREADDATA ||                                  \
+   (option) == CURLOPT_HSTSWRITEDATA ||                                 \
+   (option) == CURLOPT_INTERLEAVEDATA ||                                \
+   (option) == CURLOPT_IOCTLDATA ||                                     \
+   (option) == CURLOPT_OPENSOCKETDATA ||                                \
+   (option) == CURLOPT_PREREQDATA ||                                    \
+   (option) == CURLOPT_XFERINFODATA ||                                  \
+   (option) == CURLOPT_READDATA ||                                      \
+   (option) == CURLOPT_SEEKDATA ||                                      \
+   (option) == CURLOPT_SOCKOPTDATA ||                                   \
+   (option) == CURLOPT_SSH_KEYDATA ||                                   \
+   (option) == CURLOPT_SSL_CTX_DATA ||                                  \
+   (option) == CURLOPT_WRITEDATA ||                                     \
+   (option) == CURLOPT_RESOLVER_START_DATA ||                           \
+   (option) == CURLOPT_TRAILERDATA ||                                   \
+   (option) == CURLOPT_SSH_HOSTKEYDATA ||                               \
    0)
 
 /* evaluates to true if option takes a POST data argument (void* or char*) */
-#define curlcheck_postfields_option(option)                                   \
-  ((option) == CURLOPT_POSTFIELDS ||                                          \
-   (option) == CURLOPT_COPYPOSTFIELDS ||                                      \
+#define curlcheck_postfields_option(option)                             \
+  ((option) == CURLOPT_POSTFIELDS ||                                    \
+   (option) == CURLOPT_COPYPOSTFIELDS ||                                \
    0)
 
 /* evaluates to true if option takes a struct curl_slist * argument */
-#define curlcheck_slist_option(option)                                        \
-  ((option) == CURLOPT_HTTP200ALIASES ||                                      \
-   (option) == CURLOPT_HTTPHEADER ||                                          \
-   (option) == CURLOPT_MAIL_RCPT ||                                           \
-   (option) == CURLOPT_POSTQUOTE ||                                           \
-   (option) == CURLOPT_PREQUOTE ||                                            \
-   (option) == CURLOPT_PROXYHEADER ||                                         \
-   (option) == CURLOPT_QUOTE ||                                               \
-   (option) == CURLOPT_RESOLVE ||                                             \
-   (option) == CURLOPT_TELNETOPTIONS ||                                       \
-   (option) == CURLOPT_CONNECT_TO ||                                          \
+#define curlcheck_slist_option(option)                                  \
+  ((option) == CURLOPT_HTTP200ALIASES ||                                \
+   (option) == CURLOPT_HTTPHEADER ||                                    \
+   (option) == CURLOPT_MAIL_RCPT ||                                     \
+   (option) == CURLOPT_POSTQUOTE ||                                     \
+   (option) == CURLOPT_PREQUOTE ||                                      \
+   (option) == CURLOPT_PROXYHEADER ||                                   \
+   (option) == CURLOPT_QUOTE ||                                         \
+   (option) == CURLOPT_RESOLVE ||                                       \
+   (option) == CURLOPT_TELNETOPTIONS ||                                 \
+   (option) == CURLOPT_CONNECT_TO ||                                    \
    0)
 
 /* groups of curl_easy_getinfo infos that take the same type of argument */
 
 /* evaluates to true if info expects a pointer to char * argument */
-#define curlcheck_string_info(info)                             \
-  (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG &&        \
+#define curlcheck_string_info(info)                                     \
+  (CURLINFO_STRING < (info) && (info) < CURLINFO_LONG &&                \
    (info) != CURLINFO_PRIVATE)
 
 /* evaluates to true if info expects a pointer to long argument */
-#define curlcheck_long_info(info)                       \
+#define curlcheck_long_info(info)                                       \
   (CURLINFO_LONG < (info) && (info) < CURLINFO_DOUBLE)
 
 /* evaluates to true if info expects a pointer to double argument */
-#define curlcheck_double_info(info)                     \
+#define curlcheck_double_info(info)                                     \
   (CURLINFO_DOUBLE < (info) && (info) < CURLINFO_SLIST)
 
 /* true if info expects a pointer to struct curl_slist * argument */
 #define curlcheck_slist_info(info)                                      \
-  (((info) == CURLINFO_SSL_ENGINES) || ((info) == CURLINFO_COOKIELIST))
+  (((info) == CURLINFO_SSL_ENGINES) ||                                  \
+   ((info) == CURLINFO_COOKIELIST))
 
 /* true if info expects a pointer to struct curl_tlssessioninfo * argument */
-#define curlcheck_tlssessioninfo_info(info)                              \
-  (((info) == CURLINFO_TLS_SSL_PTR) || ((info) == CURLINFO_TLS_SESSION))
+#define curlcheck_tlssessioninfo_info(info)                             \
+  (((info) == CURLINFO_TLS_SSL_PTR) ||                                  \
+   ((info) == CURLINFO_TLS_SESSION))
 
 /* true if info expects a pointer to struct curl_certinfo * argument */
 #define curlcheck_certinfo_info(info) ((info) == CURLINFO_CERTINFO)
 
 /* true if info expects a pointer to struct curl_socket_t argument */
-#define curlcheck_socket_info(info)                     \
+#define curlcheck_socket_info(info)                                     \
   (CURLINFO_SOCKET < (info) && (info) < CURLINFO_OFF_T)
 
 /* true if info expects a pointer to curl_off_t argument */
-#define curlcheck_off_t_info(info)              \
+#define curlcheck_off_t_info(info)                                      \
   (CURLINFO_OFF_T < (info))
 
 /*
@@ -604,7 +606,7 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
  */
 
 /* XXX: should evaluate to true if expr is a pointer */
-#define curlcheck_any_ptr(expr)                 \
+#define curlcheck_any_ptr(expr)                                         \
   (sizeof(expr) == sizeof(void *))
 
 /* evaluates to true if expr is NULL */
@@ -668,7 +670,7 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
                                                                   )
 
 /* evaluates to true if expr is of type curl_off_t */
-#define curlcheck_off_t(expr)                                   \
+#define curlcheck_off_t(expr)                                           \
   (__builtin_types_compatible_p(__typeof__(expr), curl_off_t))
 
 /* evaluates to true if expr is abuffer suitable for CURLOPT_ERRORBUFFER */
@@ -706,8 +708,8 @@ CURLWARNING(Wcurl_easy_getinfo_err_curl_off_t,
    __builtin_types_compatible_p(__typeof__(func) *, type))
 
 /* evaluates to true if expr is of type curl_resolver_start_callback */
-#define curlcheck_resolver_start_callback(expr)       \
-  (curlcheck_NULL(expr) || \
+#define curlcheck_resolver_start_callback(expr)                         \
+  (curlcheck_NULL(expr) ||                                              \
    curlcheck_cb_compatible((expr), curl_resolver_start_callback))
 
 /* evaluates to true if expr is of type curl_read_callback or "similar" */
@@ -741,11 +743,11 @@ typedef size_t (*Wcurl_read_callback6)(void *, size_t, size_t, FILE *);
    curlcheck_cb_compatible((expr), Wcurl_write_callback6))
 typedef size_t (*Wcurl_write_callback1)(const char *, size_t, size_t, void *);
 typedef size_t (*Wcurl_write_callback2)(const char *, size_t, size_t,
-                                       const void *);
+                                        const void *);
 typedef size_t (*Wcurl_write_callback3)(const char *, size_t, size_t, FILE *);
 typedef size_t (*Wcurl_write_callback4)(const void *, size_t, size_t, void *);
 typedef size_t (*Wcurl_write_callback5)(const void *, size_t, size_t,
-                                       const void *);
+                                        const void *);
 typedef size_t (*Wcurl_write_callback6)(const void *, size_t, size_t, FILE *);
 
 /* evaluates to true if expr is of type curl_ioctl_callback or "similar" */
@@ -769,7 +771,7 @@ typedef curlioerr (*Wcurl_ioctl_callback4)(CURL *, curliocmd, const void *);
    curlcheck_cb_compatible((expr), Wcurl_sockopt_callback2))
 typedef int (*Wcurl_sockopt_callback1)(void *, curl_socket_t, curlsocktype);
 typedef int (*Wcurl_sockopt_callback2)(const void *, curl_socket_t,
-                                      curlsocktype);
+                                       curlsocktype);
 
 /* evaluates to true if expr is of type curl_opensocket_callback or
    "similar" */
@@ -817,21 +819,21 @@ typedef int (*Wcurl_progress_callback2)(const void *,
    curlcheck_cb_compatible((expr), Wcurl_debug_callback6) ||            \
    curlcheck_cb_compatible((expr), Wcurl_debug_callback7) ||            \
    curlcheck_cb_compatible((expr), Wcurl_debug_callback8))
-typedef int (*Wcurl_debug_callback1) (CURL *,
+typedef int (*Wcurl_debug_callback1)(CURL *,
     curl_infotype, char *, size_t, void *);
-typedef int (*Wcurl_debug_callback2) (CURL *,
+typedef int (*Wcurl_debug_callback2)(CURL *,
     curl_infotype, char *, size_t, const void *);
-typedef int (*Wcurl_debug_callback3) (CURL *,
+typedef int (*Wcurl_debug_callback3)(CURL *,
     curl_infotype, const char *, size_t, void *);
-typedef int (*Wcurl_debug_callback4) (CURL *,
+typedef int (*Wcurl_debug_callback4)(CURL *,
     curl_infotype, const char *, size_t, const void *);
-typedef int (*Wcurl_debug_callback5) (CURL *,
+typedef int (*Wcurl_debug_callback5)(CURL *,
     curl_infotype, unsigned char *, size_t, void *);
-typedef int (*Wcurl_debug_callback6) (CURL *,
+typedef int (*Wcurl_debug_callback6)(CURL *,
     curl_infotype, unsigned char *, size_t, const void *);
-typedef int (*Wcurl_debug_callback7) (CURL *,
+typedef int (*Wcurl_debug_callback7)(CURL *,
     curl_infotype, const unsigned char *, size_t, void *);
-typedef int (*Wcurl_debug_callback8) (CURL *,
+typedef int (*Wcurl_debug_callback8)(CURL *,
     curl_infotype, const unsigned char *, size_t, const void *);
 
 /* evaluates to true if expr is of type curl_ssl_ctx_callback or "similar" */
index 3d3de1270044e2611e4e6fd0ea3aa1ab7fee4bd7..78d2a5083a99aa37bc316902fd45eda7f9948af8 100644 (file)
@@ -229,7 +229,6 @@ static CURLcode altsvc_load(struct altsvcinfo *asi, const char *file)
 /*
  * Write this single altsvc entry to a single output line
  */
-
 static CURLcode altsvc_out(struct altsvc *as, FILE *fp)
 {
   struct tm stamp;
index a9e697ff60b5c7d1ab4cd7495aec395d6f44bd71..2d710f56da7679fff49cdba2c63905ab63e8ecd2 100644 (file)
@@ -600,8 +600,8 @@ async_ares_node2addr(struct ares_addrinfo_node *node)
   for(ai = node; ai != NULL; ai = ai->ai_next) {
     size_t ss_size;
     struct Curl_addrinfo *ca;
-    /* ignore elements with unsupported address family, */
-    /* settle family-specific sockaddr structure size.  */
+    /* ignore elements with unsupported address family,
+       settle family-specific sockaddr structure size. */
     if(ai->ai_family == AF_INET)
       ss_size = sizeof(struct sockaddr_in);
 #ifdef USE_IPV6
@@ -625,8 +625,8 @@ async_ares_node2addr(struct ares_addrinfo_node *node)
       break;
     }
 
-    /* copy each structure member individually, member ordering, */
-    /* size, or padding might be different for each platform.    */
+    /* copy each structure member individually, member ordering,
+       size, or padding might be different for each platform. */
 
     ca->ai_flags     = ai->ai_flags;
     ca->ai_family    = ai->ai_family;
index e3ce9577f99e2ba879c19001bce5fdbb3189a0e6..c7546344af42253bf95afcfc9b3f97137b9f58eb 100644 (file)
@@ -117,7 +117,7 @@ typedef CURLcode Curl_cft_conn_keep_alive(struct Curl_cfilter *cf,
  */
 /*      data event                            arg1       arg2     return */
 #define CF_CTRL_DATA_SETUP              4  /* 0          NULL     first fail */
-/* unused now                           5  */
+/* unused now                           5 */
 #define CF_CTRL_DATA_PAUSE              6  /* on/off     NULL     first fail */
 #define CF_CTRL_DATA_DONE               7  /* premature  NULL     ignored */
 #define CF_CTRL_DATA_DONE_SEND          8  /* 0          NULL     ignored */
@@ -170,7 +170,7 @@ typedef CURLcode Curl_cft_cntrl(struct Curl_cfilter *cf,
 #define CF_QUERY_STREAM_ERROR       6  /* error code - */
 #define CF_QUERY_NEED_FLUSH         7  /* TRUE/FALSE - */
 #define CF_QUERY_IP_INFO            8  /* TRUE/FALSE struct ip_quadruple */
-#define CF_QUERY_HTTP_VERSION       9  /* number (10/11/20/30)   -  */
+#define CF_QUERY_HTTP_VERSION       9  /* number (10/11/20/30)   - */
 /* pass in a `const struct Curl_sockaddr_ex **` as `pres2`. Gets set
  * to NULL when not connected. */
 #define CF_QUERY_REMOTE_ADDR       10  /* -          `Curl_sockaddr_ex *` */
index 25409d02f3ed860276b5ec3550189252acb5e5c1..dd93c045796a7c81b3ac8e874a48c34c6b049fed 100644 (file)
 /* ---------------------------------------------------------------- */
 
 #ifndef CURL_WINDOWS_UWP
-#undef HAVE_LDAP_URL_PARSE
 #define HAVE_LDAP_SSL 1
 #define USE_WIN32_LDAP 1
 #endif
index 4b363ebe31b04b79f6c4b780a8471c211a60918a..78c9370804824d6626e4540ad593ee4863b24a88 100644 (file)
@@ -61,7 +61,7 @@
 #include "multiif.h"
 #include "curlx/inet_ntop.h"
 #include "curlx/strparse.h"
-#include "vtls/vtls.h" /* for vtsl cfilters */
+#include "vtls/vtls.h" /* for vtls cfilters */
 #include "progress.h"
 #include "conncache.h"
 #include "multihandle.h"
index 63540c168d90167197fe6895355de2106ba585e5..43d398d119216ea4ea4e53e25873807dafe949f3 100644 (file)
@@ -115,8 +115,8 @@ int Curl_getaddrinfo_ex(const char *nodename,
 
   for(ai = aihead; ai != NULL; ai = ai->ai_next) {
     size_t namelen = ai->ai_canonname ? strlen(ai->ai_canonname) + 1 : 0;
-    /* ignore elements with unsupported address family, */
-    /* settle family-specific sockaddr structure size.  */
+    /* ignore elements with unsupported address family,
+       settle family-specific sockaddr structure size. */
     if(ai->ai_family == AF_INET)
       ss_size = sizeof(struct sockaddr_in);
 #ifdef USE_IPV6
@@ -140,8 +140,8 @@ int Curl_getaddrinfo_ex(const char *nodename,
       break;
     }
 
-    /* copy each structure member individually, member ordering, */
-    /* size, or padding might be different for each platform.    */
+    /* copy each structure member individually, member ordering,
+       size, or padding might be different for each platform. */
 
     ca->ai_flags     = ai->ai_flags;
     ca->ai_family    = ai->ai_family;
index 8742ad64af8fe0a747d290c95d46932131ae4fd6..1dcab9d8976fee32c53ed3cf95dec21ed56ef6cd 100644 (file)
@@ -725,13 +725,13 @@ ${SIZEOF_TIME_T_CODE}
    automatically */
 #cmakedefine CURL_DISABLE_OPENSSL_AUTO_LOAD_CONFIG 1
 
-/* to enable NGHTTP2  */
+/* to enable NGHTTP2 */
 #cmakedefine USE_NGHTTP2 1
 
 /* to enable NGTCP2 */
 #cmakedefine USE_NGTCP2 1
 
-/* to enable NGHTTP3  */
+/* to enable NGHTTP3 */
 #cmakedefine USE_NGHTTP3 1
 
 /* to enable quiche */
@@ -743,13 +743,13 @@ ${SIZEOF_TIME_T_CODE}
 /* Define to 1 if you have the quiche_conn_set_qlog_fd function. */
 #cmakedefine HAVE_QUICHE_CONN_SET_QLOG_FD 1
 
-/* if Unix domain sockets are enabled  */
+/* if Unix domain sockets are enabled */
 #cmakedefine USE_UNIX_SOCKETS 1
 
 /* to enable SSPI support */
 #cmakedefine USE_WINDOWS_SSPI 1
 
-/* to enable Windows SSL  */
+/* to enable Windows SSL */
 #cmakedefine USE_SCHANNEL 1
 
 /* if Watt-32 is in use */
index 207ba7125d62ab9a358a5644c3adbdc31abd6cef..3b1a5af3b4593f544383faee11c07d8618a9d8ea 100644 (file)
 #define MERR_MEM       1
 #define MERR_TOO_LARGE 2
 
-/* Lower-case digits.  */
+/* Lower-case digits. */
 extern const unsigned char Curl_ldigits[];
 
-/* Upper-case digits.  */
+/* Upper-case digits. */
 extern const unsigned char Curl_udigits[];
 
 #endif /* HEADER_CURL_PRINTF_H */
index 5e03bf35655e1ca95863914209272dcb31235e55..8a97f52adcff1c1730743e90575565aebd024431 100644 (file)
@@ -147,11 +147,11 @@ void Curl_sasl_init(struct SASL *sasl, struct Curl_easy *data,
 /* Check if we have enough auth data and capabilities to authenticate */
 bool Curl_sasl_can_authenticate(struct SASL *sasl, struct Curl_easy *data);
 
-/* Calculate the required login details for SASL authentication  */
+/* Calculate the required login details for SASL authentication */
 CURLcode Curl_sasl_start(struct SASL *sasl, struct Curl_easy *data,
                          bool force_ir, saslprogress *progress);
 
-/* Continue an SASL authentication  */
+/* Continue an SASL authentication */
 CURLcode Curl_sasl_continue(struct SASL *sasl, struct Curl_easy *data,
                             int code, saslprogress *progress);
 
index ae67e9bb429345473d8333de5ecf4482874e53c6..03eb80341c71082c1a3445e8bd4ab5819572c3c9 100644 (file)
@@ -194,7 +194,6 @@ timediff_t curlx_ptimediff_ms(const struct curltime *newer,
   return (diff * 1000) + ((newer->tv_usec - older->tv_usec) / 1000);
 }
 
-
 timediff_t curlx_timediff_ms(struct curltime newer, struct curltime older)
 {
   return curlx_ptimediff_ms(&newer, &older);
index 2ea06c444fd32f164769906430cef2da8829a137..9f9a89e4022bcdbfb7ebf816492b9f67ea318c28 100644 (file)
@@ -24,7 +24,7 @@
  *
  ***************************************************************************/
 /* Escape and unescape URL encoding in strings. The functions return a new
- * allocated string or NULL if an error occurred.  */
+ * allocated string or NULL if an error occurred. */
 
 enum urlreject {
   REJECT_NADA = 2,
index bf5a44892c5d2be4ab1414c34b7922218a7d4aaa..d8b139830b83af600dfee6cb4d9b519e898bb221 100644 (file)
@@ -67,8 +67,8 @@ static struct addrinfo *mk_getaddrinfo(const struct ares_addrinfo *aihead)
   for(ai = aihead->nodes; ai != NULL; ai = ai->ai_next) {
     size_t ss_size;
     size_t namelen = name ? strlen(name) + 1 : 0;
-    /* ignore elements with unsupported address family, */
-    /* settle family-specific sockaddr structure size.  */
+    /* ignore elements with unsupported address family,
+       settle family-specific sockaddr structure size. */
     if(ai->ai_family == AF_INET)
       ss_size = sizeof(struct sockaddr_in);
     else if(ai->ai_family == AF_INET6)
@@ -90,8 +90,8 @@ static struct addrinfo *mk_getaddrinfo(const struct ares_addrinfo *aihead)
       return NULL;
     }
 
-    /* copy each structure member individually, member ordering, */
-    /* size, or padding might be different for each platform.    */
+    /* copy each structure member individually, member ordering,
+       size, or padding might be different for each platform. */
 
     ca->ai_flags     = ai->ai_flags;
     ca->ai_family    = ai->ai_family;
index fd10b0762972bdbd0c5bdab651d7f5dc4c2c69f1..c234f35bacf70e3d714b1fd7c8249403aea523a1 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -637,7 +637,7 @@ static CURLcode getftpresponse(struct Curl_easy *data,
    * the OpenSSL read() does not grok that properly.
    *
    * Alas, read as much as possible, split up into lines, use the ending
-   * line in a response or continue reading.  */
+   * line in a response or continue reading. */
 
   struct connectdata *conn = data->conn;
   curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
@@ -1801,7 +1801,7 @@ static CURLcode ftp_state_retr(struct Curl_easy *data,
     }
     else {
       /* We got a file size report, so we check that there actually is a
-         part of the file left to get, or else we go home.  */
+         part of the file left to get, or else we go home. */
       if(data->state.resume_from < 0) {
         /* We are supposed to download the last abs(from) bytes */
         if(filesize < -data->state.resume_from) {
index 183a39966ec0c3997be3657cf016c3719fafa79f..50b128c531ab1059ed9c4a059c6aab6830770525 100644 (file)
@@ -684,11 +684,12 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
     /* Basic */
     if(
 #ifndef CURL_DISABLE_PROXY
-      (proxy && conn->bits.proxy_user_passwd &&
-       !Curl_checkProxyheaders(data, conn, STRCONST("Proxy-authorization"))) ||
+       (proxy && conn->bits.proxy_user_passwd &&
+        !Curl_checkProxyheaders(data, conn,
+                                STRCONST("Proxy-authorization"))) ||
 #endif
-      (!proxy && data->state.aptr.user &&
-       !Curl_checkheaders(data, STRCONST("Authorization")))) {
+       (!proxy && data->state.aptr.user &&
+        !Curl_checkheaders(data, STRCONST("Authorization")))) {
       auth = "Basic";
       result = http_output_basic(data, proxy);
       if(result)
@@ -703,8 +704,8 @@ static CURLcode output_auth_headers(struct Curl_easy *data,
 #ifndef CURL_DISABLE_BEARER_AUTH
   if(authstatus->picked == CURLAUTH_BEARER) {
     /* Bearer */
-    if((!proxy && data->set.str[STRING_BEARER] &&
-        !Curl_checkheaders(data, STRCONST("Authorization")))) {
+    if(!proxy && data->set.str[STRING_BEARER] &&
+       !Curl_checkheaders(data, STRCONST("Authorization"))) {
       auth = "Bearer";
       result = http_output_bearer(data);
       if(result)
@@ -2625,7 +2626,6 @@ static CURLcode http_range(struct Curl_easy *data,
         data->state.aptr.rangeline =
           curl_maprintf("Content-Range: bytes 0-%" FMT_OFF_T "/"
                         "%" FMT_OFF_T "\r\n", req_clen - 1, req_clen);
-
       }
       else if(data->state.resume_from) {
         /* This is because "resume" was selected */
@@ -3776,7 +3776,7 @@ static CURLcode http_statusline(struct Curl_easy *data,
     /* (quote from RFC2616, section 10.3.5): The 304 response
      * MUST NOT contain a message-body, and thus is always
      * terminated by the first empty line after the header
-     * fields.  */
+     * fields. */
     if(data->set.timecondition)
       data->info.timecond = TRUE;
     FALLTHROUGH();
@@ -4345,7 +4345,7 @@ void Curl_http_to_fold(struct dynbuf *bf)
     len--;
   if(len && (hd[len - 1] == '\r'))
     len--;
-  while(len && (ISBLANK(hd[len - 1]))) /* strip off trailing whitespace */
+  while(len && ISBLANK(hd[len - 1])) /* strip off trailing whitespace */
     len--;
   curlx_dyn_setlen(bf, len);
 }
index fa160c1cf6e677a2e20dc27ab8ede034efe54edf..27f60b7656099ba21348e219545778a343a662ee 100644 (file)
@@ -65,7 +65,7 @@
 #define H2_NW_RECV_CHUNKS       (H2_CONN_WINDOW_SIZE / H2_CHUNK_SIZE)
 /* on send into TLS, we just want to accumulate small frames */
 #define H2_NW_SEND_CHUNKS       1
-/* this is how much we want "in flight" for a stream, unthrottled  */
+/* this is how much we want "in flight" for a stream, unthrottled */
 #define H2_STREAM_WINDOW_SIZE_MAX   (10 * 1024 * 1024)
 /* this is how much we want "in flight" for a stream, initially, IFF
  * nghttp2 allows us to tweak the local window size. */
@@ -888,7 +888,6 @@ static void h2_xfer_write_resp_hd(struct Curl_cfilter *cf,
                                   struct h2_stream_ctx *stream,
                                   const char *buf, size_t blen, bool eos)
 {
-
   /* If we already encountered an error, skip further writes */
   if(!stream->xfer_result) {
     stream->xfer_result = Curl_xfer_write_resp_hd(data, buf, blen, eos);
@@ -905,7 +904,6 @@ static void h2_xfer_write_resp(struct Curl_cfilter *cf,
                                struct h2_stream_ctx *stream,
                                const char *buf, size_t blen, bool eos)
 {
-
   /* If we already encountered an error, skip further writes */
   if(!stream->xfer_result)
     stream->xfer_result = Curl_xfer_write_resp(data, buf, blen, eos);
index 40edcf315c05956c268dec5477060604cc1de4d3..492be1ab58634f8f6ef5773a21c6d54753fa7a5e 100644 (file)
@@ -645,7 +645,6 @@ fail:
 
 static int compare_func(const void *a, const void *b)
 {
-
   const struct pair *aa = a;
   const struct pair *bb = b;
   const size_t aa_key_len = curlx_dyn_len(&aa->key);
index 06244b6dacabd02cd423d9df7da2fb5c7c3575ab..8aa0afb8d270829e35c449defc4f87c0e2dcc3c6 100644 (file)
@@ -1176,7 +1176,7 @@ static CURLcode imap_state_login_resp(struct Curl_easy *data,
   return result;
 }
 
-/* Detect IMAP listings vs. downloading a single email  */
+/* Detect IMAP listings vs. downloading a single email */
 static bool is_custom_fetch_listing_match(const char *params)
 {
   /* match " 1:* (FLAGS ..." or " 1,2,3 (FLAGS ..." */
@@ -2324,7 +2324,6 @@ static const struct Curl_protocol Curl_protocol_imap = {
 
 #endif /* CURL_DISABLE_IMAP */
 
-
 /*
  * IMAP protocol handler.
  */
index 6d267e18cdea6ca62e26ea9171d46b19eb7eb0a2..d874efe81a2a7df674b5dcb6cbc39cf1f729441c 100644 (file)
 #define MAX_PARAMETERS 128 /* number of input arguments */
 #define MAX_SEGMENTS   128 /* number of output segments */
 
-/* Lower-case digits.  */
+/* Lower-case digits. */
 const unsigned char Curl_ldigits[] = "0123456789abcdef";
 
-/* Upper-case digits.  */
+/* Upper-case digits. */
 const unsigned char Curl_udigits[] = "0123456789ABCDEF";
 
 #define OUTCHAR(x)                                       \
@@ -131,9 +131,9 @@ struct asprintf {
 };
 
 /* the provided input number is 1-based but this returns the number 0-based.
-
  returns -1 if no valid number was provided.
-*/
+ *
* returns -1 if no valid number was provided.
+ */
 static int dollarstring(const char *p, const char **end)
 {
   curl_off_t num;
@@ -596,8 +596,8 @@ static int parsefmt(const char *format,
 }
 
 struct mproperty {
-  int width;            /* Width of a field.  */
-  int prec;             /* Precision of a field.  */
+  int width;            /* Width of a field. */
+  int prec;             /* Precision of a field. */
   unsigned int flags;
 };
 
@@ -722,7 +722,7 @@ static bool out_number(void *userp,
   char *w;
 
   if(flags & FLAGS_CHAR) {
-    /* Character.  */
+    /* Character. */
     if(!(flags & FLAGS_LEFT))
       while(--width > 0)
         OUTCHAR(' ');
@@ -746,11 +746,11 @@ static bool out_number(void *userp,
     ;
 
   else {
-    /* Decimal integer.  */
+    /* Decimal integer. */
     is_neg = (nums < 0);
     if(is_neg) {
       /* signed_num might fail to hold absolute negative minimum by 1 */
-      int64_t signed_num; /* Used to convert negative in positive.  */
+      int64_t signed_num; /* Used to convert negative in positive. */
       signed_num = nums + (int64_t)1;
       signed_num = -signed_num;
       num = (uint64_t)signed_num;
@@ -758,11 +758,11 @@ static bool out_number(void *userp,
     }
   }
 
-  /* Supply a default precision if none was given.  */
+  /* Supply a default precision if none was given. */
   if(prec == -1)
     prec = 1;
 
-  /* Put the number in WORK.  */
+  /* Put the number in WORK. */
   w = workend;
   DEBUGASSERT(base <= 16);
   switch(base) {
@@ -822,7 +822,7 @@ static bool out_number(void *userp,
     while(width-- > 0)
       OUTCHAR('0');
 
-  /* Write the number.  */
+  /* Write the number. */
   while(++w <= workend) {
     OUTCHAR(*w);
   }
@@ -848,7 +848,7 @@ static bool out_string(void *userp,
   size_t len;
 
   if(!str) {
-    /* Write null string if there is space.  */
+    /* Write null string if there is space. */
     if(prec == -1 || prec >= (int)sizeof(nilstr) - 1) {
       str = nilstr;
       len = sizeof(nilstr) - 1;
@@ -895,17 +895,17 @@ static bool out_pointer(void *userp,
                         char *work,
                         int *donep)
 {
-  /* Generic pointer.  */
+  /* Generic pointer. */
   if(ptr) {
     size_t num = (size_t)ptr;
 
-    /* If the pointer is not NULL, write it as a %#x spec.  */
+    /* If the pointer is not NULL, write it as a %#x spec. */
     p->flags |= FLAGS_HEX | FLAGS_ALT;
     if(out_number(userp, stream, p, num, 0, work, donep))
       return TRUE;
   }
   else {
-    /* Write "(nil)" for a nil pointer.  */
+    /* Write "(nil)" for a nil pointer. */
     const char *point;
     int width = p->width;
     int flags = p->flags;
@@ -946,7 +946,7 @@ static int formatf(void *userp, /* untouched by format(), just sent to the
                    const char *format, /* %-formatted string */
                    va_list ap_save) /* list of parameters */
 {
-  int done = 0;   /* number of characters written  */
+  int done = 0;   /* number of characters written */
   int i;
   int ocount = 0; /* number of output segments */
   int icount = 0; /* number of input arguments */
@@ -1042,7 +1042,7 @@ static int formatf(void *userp, /* untouched by format(), just sent to the
       break;
 
     case MTYPE_INTPTR:
-      /* Answer the count of characters written.  */
+      /* Answer the count of characters written. */
       if(p.flags & FLAGS_LONGLONG)
         *(int64_t *)iptr->val.ptr = (int64_t)done;
       else
index 446918cc44886a99b297d41aa1437c8d8e9ac702..ef373c06388fc7d73d70bd230b3fd0fb456f24b0 100644 (file)
@@ -962,7 +962,6 @@ static CURLcode mqtts_connecting(struct Curl_easy *data, bool *done)
 /*
  * MQTTS protocol.
  */
-
 static const struct Curl_protocol Curl_protocol_mqtts = {
   mqtt_setup_conn,                    /* setup_connection */
   mqtt_do,                            /* do_it */
@@ -988,7 +987,6 @@ static const struct Curl_protocol Curl_protocol_mqtts = {
 /*
  * MQTT protocol.
  */
-
 static const struct Curl_protocol Curl_protocol_mqtt = {
   mqtt_setup_conn,                    /* setup_connection */
   mqtt_do,                            /* do_it */
@@ -1011,7 +1009,6 @@ static const struct Curl_protocol Curl_protocol_mqtt = {
 
 #endif /* CURL_DISABLE_MQTT */
 
-
 const struct Curl_scheme Curl_scheme_mqtts = {
   "mqtts",                            /* scheme */
 #if defined(CURL_DISABLE_MQTT) || !defined(USE_SSL)
@@ -1028,7 +1025,6 @@ const struct Curl_scheme Curl_scheme_mqtts = {
 /*
  * MQTT protocol.
  */
-
 const struct Curl_scheme Curl_scheme_mqtt = {
   "mqtt",                             /* scheme */
 #ifdef CURL_DISABLE_MQTT
index 031660c531810529f146951304a5c482121a35c3..1073cc53656f0bd71017f906c1f4c82fbdb3c222 100644 (file)
@@ -151,7 +151,7 @@ static NETRCcode parsenetrc(struct store_netrc *store,
       }
 
       if(!*tok || (*tok == '\n'))
-        /* end of line  */
+        /* end of line */
         break;
 
       /* leading double-quote means quoted string */
index 83ae013593d8ab56826d5ad7e1d933dcddcacc3b..8dd984132c3052b66bfa5cfce332dfd8e64612e6 100644 (file)
@@ -114,7 +114,6 @@ struct ldapreqinfo {
 /* meta key for storing ldapconninfo at connection */
 #define CURL_META_LDAP_CONN   "meta:proto:ldap:conn"
 
-
 /*
  * oldap_state()
  *
index 4069f78b52d2c3330683f5f07e376c1d96a3c122..ffcd44cfcfc773158bcc47a6d422ddfb962b39c1 100644 (file)
@@ -169,14 +169,11 @@ CURLcode Curl_pollset_set(struct Curl_easy *data,
 #define Curl_pollset_remove_out(data, ps, sock) \
   Curl_pollset_change(data, ps, sock, 0, CURL_POLL_OUT)
 #define Curl_pollset_add_inout(data, ps, sock) \
-  Curl_pollset_change(data, ps, sock, \
-                      CURL_POLL_IN | CURL_POLL_OUT, 0)
+  Curl_pollset_change(data, ps, sock, CURL_POLL_IN | CURL_POLL_OUT, 0)
 #define Curl_pollset_set_in_only(data, ps, sock) \
-  Curl_pollset_change(data, ps, sock, \
-                      CURL_POLL_IN, CURL_POLL_OUT)
+  Curl_pollset_change(data, ps, sock, CURL_POLL_IN, CURL_POLL_OUT)
 #define Curl_pollset_set_out_only(data, ps, sock) \
-  Curl_pollset_change(data, ps, sock, \
-                      CURL_POLL_OUT, CURL_POLL_IN)
+  Curl_pollset_change(data, ps, sock, CURL_POLL_OUT, CURL_POLL_IN)
 
 /* return < = on error, 0 on timeout or how many sockets are ready */
 int Curl_pollset_poll(struct Curl_easy *data,
index 952ed4c12357b4c7e95fe0d488e43733411962de..75c6e248ea473f8a94f819186cad0aaeb6efb020 100644 (file)
@@ -55,7 +55,7 @@ struct Curl_cwriter;
 struct Curl_easy;
 
 /**
- * Write `len` bytes at `prt` to the client. `type` indicates what
+ * Write `len` bytes at `buf` to the client. `type` indicates what
  * kind of data is being written.
  */
 CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf,
index dd460223b90899afa8766dc59c1537328c617da2..331d5edcaeb67c354b2cb53642de89e1f8f1074b 100644 (file)
  *
  ***************************************************************************/
 
-/*                                                                         */
-/* JEM, 12/30/12, VMS now generates config.h, so only define wrappers for  */
-/*                getenv(), getpwuid() and provide is_vms_shell()          */
-/*                Also need upper case symbols for system services, and    */
-/*                OpenSSL, and some Kerberos image                         */
+/* JEM, 2012-12-30, VMS now generates config.h, so only define wrappers for */
+/*                  getenv(), getpwuid() and provide is_vms_shell()         */
+/*                  Also need upper case symbols for system services, and   */
+/*                  OpenSSL, and some Kerberos image                        */
 
 #ifdef __DECC
 #pragma message save
index e35aa30649b300265dab99ce30aaa5d09385dd43..b438b2cc01bd29759f5a6cff998afbd86a6fed11 100644 (file)
@@ -232,8 +232,8 @@ static void my_sha256_final(unsigned char *digest, void *in)
     (a)[3] = (unsigned char) (((unsigned long)(val)) & 0xff);        \
   } while(0)
 
-#define WPA_PUT_BE64(a, val)                                      \
-  do {                                                            \
+#define WPA_PUT_BE64(a, val)                            \
+  do {                                                  \
     (a)[0] = (unsigned char)(((uint64_t)(val)) >> 56);  \
     (a)[1] = (unsigned char)(((uint64_t)(val)) >> 48);  \
     (a)[2] = (unsigned char)(((uint64_t)(val)) >> 40);  \
index 8e76edc83deba356a7c6e619908d40fc8a155a0f..41ba48fe89629b33da8fe93bf061a5f56d02d288 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -1249,7 +1249,7 @@ const struct Curl_scheme Curl_scheme_smb = {
  */
 const struct Curl_scheme Curl_scheme_smbs = {
   "smbs",                               /* scheme */
-#if defined(CURL_DISABLE_SMB) || !defined(USE_CURL_NTLM_CORE) ||        \
+#if defined(CURL_DISABLE_SMB) || !defined(USE_CURL_NTLM_CORE) || \
   !defined(USE_SSL)
   ZERO_NULL,
 #else
index 93f1211ab0ddf0f40585d1de2490ecf470e31956..7b0d242afbc7beb7368b9a021b4ec7bdfbe0edbc 100644 (file)
@@ -1061,9 +1061,9 @@ static CURLcode smtp_perform_mail(struct Curl_easy *data,
                          "MAIL FROM:%s%s%s%s%s%s",
                          from,                 /* Mandatory                 */
                          auth ? " AUTH=" : "", /* Optional on AUTH support  */
-                         auth ? auth : "",     /*                           */
+                         auth ? auth : "",
                          size ? " SIZE=" : "", /* Optional on SIZE support  */
-                         size ? size : "",     /*                           */
+                         size ? size : "",
                          utf8 ? " SMTPUTF8"    /* Internationalised mailbox */
                                : "");          /* included in our envelope  */
 
index 569d10945c3cec5e9088946199e1cd9b9b624975..912e8c52f5987412ecd216a44b117ce0c9cb5ae3 100644 (file)
@@ -1339,7 +1339,6 @@ static CURLcode socks_cf_adjust_pollset(struct Curl_cfilter *cf,
 static void socks_proxy_cf_close(struct Curl_cfilter *cf,
                                  struct Curl_easy *data)
 {
-
   DEBUGASSERT(cf->next);
   cf->connected = FALSE;
   socks_proxy_cf_free(cf);
index 84a974db6a7c6a69ced28c74421138f1dcc8d5d5..cc0e04388714b1bfdd546682c0c62c2cdf3e305a 100644 (file)
@@ -281,7 +281,7 @@ static CURLcode socks5_sspi_encrypt(struct Curl_cfilter *cf,
 
   infof(data, "SOCKS5 server supports GSS-API %s data protection.",
         (gss_enc == 0) ? "no" :
-        ((gss_enc == 1) ? "integrity" : "confidentiality") );
+        ((gss_enc == 1) ? "integrity" : "confidentiality"));
 
   sspi_w_token[0].pvBuffer =
     sspi_w_token[1].pvBuffer =
index 2f24fe5c0ccec9c72477a785086e073a8cfd9e51..c951da9d99e5c5486e2daa8b3cdb9c93520f64fd 100644 (file)
@@ -45,7 +45,7 @@ CURLcode Curl_win32_init(long flags)
 
     if(res)
       /* Tell the user that we could not find a usable */
-      /* winsock.dll.     */
+      /* winsock.dll. */
       return CURLE_FAILED_INIT;
 
     /* Confirm that the Windows Sockets DLL supports what we need.*/
index 7e7408a5d70be40f4c415557e2b59184be0fde26..0e594681eaea43d3b3a9f5e6fa9013a2e9e0e1a7 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -1844,7 +1844,7 @@ static CURLcode parseurlandfillconn(struct Curl_easy *data,
 
 #ifdef USE_IPV6
   if(data->set.scope_id)
-    /* Override any scope that was set above.  */
+    /* Override any scope that was set above. */
     conn->scope_id = data->set.scope_id;
 #endif
 
@@ -2538,7 +2538,6 @@ error:
 static CURLcode parse_remote_port(struct Curl_easy *data,
                                   struct connectdata *conn)
 {
-
   if(data->set.use_port && data->state.allow_port) {
     /* if set, we use this instead of the port possibly given in the URL */
     char portbuf[16];
index 2ca2233c563e6cf84226fddd8c6eb5be4c429cdf..b437771517c0cc5d8ea9ce8e24a76e24c2563bca 100644 (file)
@@ -217,7 +217,7 @@ typedef CURLcode (Curl_recv)(struct Curl_easy *data,   /* transfer */
  * us early warning on things only discovered by valgrind otherwise. */
 #define GOOD_EASY_HANDLE(x) \
   (((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER)) ? TRUE : \
-  (DEBUGASSERT(!(x)), FALSE))
+   (DEBUGASSERT(!(x)), FALSE))
 #else
 #define GOOD_EASY_HANDLE(x) \
   ((x) && ((x)->magic == CURLEASY_MAGIC_NUMBER))
@@ -1303,7 +1303,7 @@ struct UserDefined {
   curl_write_callback fwrite_header; /* function that stores headers */
   curl_write_callback fwrite_rtp;    /* function that stores interleaved RTP */
   curl_read_callback fread_func_set; /* function that reads the input */
-  curl_progress_callback fprogress; /* OLD and deprecated progress callback  */
+  curl_progress_callback fprogress; /* OLD and deprecated progress callback */
   curl_xferinfo_callback fxferinfo; /* progress callback */
   curl_debug_callback fdebug;      /* function that write informational data */
   curl_ioctl_callback ioctl_func;  /* function for I/O control */
@@ -1373,7 +1373,7 @@ struct UserDefined {
   curl_off_t max_filesize; /* Maximum file size to download */
 #ifndef CURL_DISABLE_FTP
   timediff_t accepttimeout;   /* in milliseconds, 0 means no timeout */
-  uint8_t ftp_filemethod; /* how to get to a file: curl_ftpfile  */
+  uint8_t ftp_filemethod; /* how to get to a file: curl_ftpfile */
   uint8_t ftpsslauth; /* what AUTH XXX to try: curl_ftpauth */
   uint8_t ftp_ccc;   /* FTP CCC options: curl_ftpccc */
 #endif
@@ -1443,7 +1443,7 @@ struct UserDefined {
 #endif
   uint32_t maxconnects; /* Max idle connections in the connection cache */
 #ifdef USE_ECH
-  int tls_ech;      /* TLS ECH configuration  */
+  int tls_ech;      /* TLS ECH configuration */
 #endif
   short maxredirs;    /* maximum no. of http(s) redirects to follow,
                          set to -1 for infinity */
@@ -1460,7 +1460,7 @@ struct UserDefined {
   uint16_t tftp_blksize;    /* in bytes, 0 means use default */
 #endif
 #ifndef CURL_DISABLE_NETRC
-  uint8_t use_netrc;        /* enum CURL_NETRC_OPTION values  */
+  uint8_t use_netrc;        /* enum CURL_NETRC_OPTION values */
 #endif
 #if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
   /* Despite the name, ftp_create_missing_dirs is for FTP(S) and SFTP
@@ -1543,7 +1543,7 @@ struct UserDefined {
   BIT(opt_no_body);    /* as set with CURLOPT_NOBODY */
   BIT(verbose);        /* output verbosity */
   BIT(reuse_forbid);   /* forbidden to be reused, close after use */
-  BIT(reuse_fresh);    /* do not reuse an existing connection  */
+  BIT(reuse_fresh);    /* do not reuse an existing connection */
   BIT(no_signal);      /* do not use any signal/alarm handler */
   BIT(tcp_nodelay);    /* whether to enable TCP_NODELAY or not */
   BIT(ignorecl);       /* ignore content length */
index ad08f34a8f197a6dce062b4925045893d412aa9b..53617773b5dfb53d261b53b98738076a412f5b6c 100644 (file)
@@ -1227,7 +1227,7 @@ static int myssh_in_SFTP_CLOSE(struct Curl_easy *data,
 
   /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
      After nextstate is executed, the control should come back to
-     SSH_SFTP_CLOSE to pass the correct result back  */
+     SSH_SFTP_CLOSE to pass the correct result back */
   if(sshc->nextstate != SSH_NO_STATE &&
      sshc->nextstate != SSH_SFTP_CLOSE) {
     myssh_to(data, sshc, sshc->nextstate);
index 61086d6f681284d4a190994078aca15334fb4712..db52d1e70337189d0dae21ce53532b2d8404595a 100644 (file)
@@ -2297,7 +2297,7 @@ static CURLcode ssh_state_sftp_close(struct Curl_easy *data,
 
   /* Check if nextstate is set and move .nextstate could be POSTQUOTE_INIT
      After nextstate is executed, the control should come back to
-     SSH_SFTP_CLOSE to pass the correct result back  */
+     SSH_SFTP_CLOSE to pass the correct result back */
   if(sshc->nextstate != SSH_NO_STATE &&
      sshc->nextstate != SSH_SFTP_CLOSE) {
     myssh_to(data, sshc, sshc->nextstate);
index 014aadd17d6078f3fd539bfd085aedfc7ccb20a6..b5263d398bd4695730e859c537e414c7466b039a 100644 (file)
@@ -5384,7 +5384,7 @@ static CURLcode ossl_random(struct Curl_easy *data,
     if(!rand_enough())
       return CURLE_FAILED_INIT;
   }
-  /* RAND_bytes() returns 1 on success, 0 otherwise.  */
+  /* RAND_bytes() returns 1 on success, 0 otherwise. */
   rc = RAND_bytes(entropy, (ossl_valsize_t)curlx_uztosi(length));
   return rc == 1 ? CURLE_OK : CURLE_FAILED_INIT;
 }
index 5f0bdcc8ace6c739ee95d4127441f7e5f7c33123..f9b475b1223d614ff4d2b0b165155a18899a6183 100644 (file)
@@ -416,7 +416,7 @@ static CURLcode get_client_cert(struct Curl_easy *data,
     }
 
     if(fInCert || blob) {
-      /* Reading a .P12 or .pfx file, like the example at bottom of
+      /* Reading a .p12 or .pfx file, like the example at bottom of
          https://learn.microsoft.com/archive/msdn-technet-forums/3e7bc95f-b21a-4bcd-bd2c-7f996718cae5
       */
       CRYPT_DATA_BLOB datablob;
@@ -2030,8 +2030,8 @@ static CURLcode schannel_send(struct Curl_cfilter *cf, struct Curl_easy *data,
       timediff_t timeout_ms = Curl_timeleft_ms(data);
       if(timeout_ms < 0) {
         /* we already got the timeout */
-        failf(data, "schannel: timed out sending data "
-              "(bytes sent: %zu)", *pnwritten);
+        failf(data, "schannel: timed out sending data (bytes sent: %zu)",
+              *pnwritten);
         result = CURLE_OPERATION_TIMEDOUT;
         break;
       }
@@ -2045,8 +2045,8 @@ static CURLcode schannel_send(struct Curl_cfilter *cf, struct Curl_easy *data,
         break;
       }
       else if(what == 0) {
-        failf(data, "schannel: timed out sending data "
-              "(bytes sent: %zu)", *pnwritten);
+        failf(data, "schannel: timed out sending data (bytes sent: %zu)",
+              *pnwritten);
         result = CURLE_OPERATION_TIMEDOUT;
         break;
       }
index 8533e9ccc163b95c6b1d516eba8778506707fcc2..414b2e915aaaf7086002f5217db5f2cfda0b2881 100644 (file)
 #include "vtls/schannel.h"
 #include "vtls/schannel_int.h"
 
-#include "curlx/fopen.h"
-#include "curlx/inet_pton.h"
+#include "vtls/hostcheck.h"
 #include "vtls/vtls.h"
 #include "vtls/vtls_int.h"
 #include "curl_trc.h"
 #include "strerror.h"
-#include "curlx/winapi.h"
+#include "curlx/fopen.h"
+#include "curlx/inet_pton.h"
 #include "curlx/multibyte.h"
-#include "vtls/hostcheck.h"
 #include "curlx/version_win32.h"
+#include "curlx/winapi.h"
 
 #define BACKEND ((struct schannel_ssl_backend_data *)connssl->backend)
 
-#define MAX_CAFILE_SIZE 1048576 /* 1 MiB */
+#define MAX_CAFILE_SIZE (1024 * 1024) /* 1 MiB */
 #define BEGIN_CERT      "-----BEGIN CERTIFICATE-----"
 #define END_CERT        "\n-----END CERTIFICATE-----"
 
@@ -438,10 +438,8 @@ static DWORD cert_get_name_string(struct Curl_easy *data,
 
 static bool get_num_host_info(struct num_ip_data *ip_blob, LPCSTR hostname)
 {
-  struct in_addr ia;
-  struct in6_addr ia6;
   bool result = FALSE;
-
+  struct in_addr ia;
   int res = curlx_inet_pton(AF_INET, hostname, &ia);
   if(res) {
     ip_blob->size = sizeof(struct in_addr);
@@ -449,6 +447,7 @@ static bool get_num_host_info(struct num_ip_data *ip_blob, LPCSTR hostname)
     result = TRUE;
   }
   else {
+    struct in6_addr ia6;
     res = curlx_inet_pton(AF_INET6, hostname, &ia6);
     if(res) {
       ip_blob->size = sizeof(struct in6_addr);
index 0850f5306d63c0cac7af52e69c2eeb04652f5616..83e2a7ca549d0161f34909ddda1725d068ac9393 100644 (file)
@@ -97,7 +97,7 @@ struct ssl_peer {
 CURLsslset Curl_init_sslset_nolock(curl_sslbackend id, const char *name,
                                    const curl_ssl_backend ***avail);
 
-#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1 MiB */
+#define MAX_PINNED_PUBKEY_SIZE (1024 * 1024) /* 1 MiB */
 
 curl_sslbackend Curl_ssl_backend(void);
 
index 377175d56d9b3297847b1652cdf7b3e86c2aaba6..89310adfaecfe153e34376d5d7c35a8d11212ebe 100644 (file)
@@ -1424,7 +1424,6 @@ CURLcode Curl_wssl_ctx_init(struct wssl_ctx *wctx,
       result = CURLE_SSL_CONNECT_ERROR;
       goto out;
     }
-
   }
 #endif /* HAVE_WOLFSSL_CTX_GENERATEECHCONFIG */
 
index 29a38db493e939855b0fa0c8fa4b24f09a7fd4fe..83af6400f0f01fdd83734acf7d0d76484b4b022b 100644 (file)
 
 #include "curlmsg.h"
 
-/*
-#define   FAC_CURL      0xC01
-#define   FAC_SYSTEM    0
-#define   MSG_NORMAL    0
-*/
-
-/*
-#define   SEV_WARNING   0
-#define   SEV_SUCCESS   1
-#define   SEV_ERROR     2
-#define   SEV_INFO      3
-#define   SEV_FATAL     4
-*/
-
 static const long vms_cond[] =
 {
   CURL_OK,
index 14d94d09bb760bdacc0ae5bafbb26a5065a188a9..2ae5232f4ba2cd88bfa7ac7e4391036885c11b44 100755 (executable)
@@ -1230,7 +1230,6 @@ sub scanfile {
     checksrc_endoffile($file);
 
     close($R);
-
 }
 
 if($errors || $warnings || $verbose) {
index 13a2302865ce60262393fa99ae835864669df051..d70df2fbfd0c76160a2c4cf316fe2ff3d9ac650c 100755 (executable)
@@ -529,7 +529,6 @@ sub render {
         my $qstr = $quote ? "q" : "";
         push @desc, "[".(1 + $level)."$qstr]$d" if(!$manpage);
         $header = 0;
-
     }
     if($finalblank) {
         print STDERR "$f:$line:1:ERROR: trailing blank line\n";
index 2fb2c9793f044855534899e85f83aa04c1464e4a..ff8d8661981b2c55a06d86f41baa68e5bde655dd 100755 (executable)
@@ -180,6 +180,26 @@ while(my $filename = <$git_ls_files>) {
         $linepos += $line;
     }
 
+    $search = $content;
+    $linepos = 0;
+    while($search =~ /\n\n *}\n/) {
+        my $part = substr($search, 0, $+[0] - 1);
+        $search = substr($search, $+[0]);
+        my $line = ($part =~ tr/\n//);
+        push @err, sprintf("line %d: '}' preceded by empty line", $linepos + $line);
+        $linepos += $line + 1;
+    }
+
+    $search = $content;
+    $linepos = 0;
+    while($search =~ /\n\{\n\n/) {
+        my $part = substr($search, 0, $+[0]);
+        $search = substr($search, $+[0]);
+        my $line = ($part =~ tr/\n//);
+        push @err, sprintf("line %d: top-level '{' followed by empty line", $linepos + $line);
+        $linepos += $line;
+    }
+
     if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
         push @err, "content: has binary contents";
     }
index 26fa20ee871201387a7eeb6ea0781ef251731418..69a9256bb8df5d85be42896a431138bb206d6194 100755 (executable)
@@ -111,7 +111,6 @@ for my $l (@output) {
         $alllines += $len;
         $allscore += ($len * $score);
     }
-
 }
 
 my $showncutoff;
index 45886952d6ff7318cc67b1dabe0b02a980065acf..2f7630059c708817be00f385a34cecf4f8223aba 100644 (file)
@@ -185,12 +185,12 @@ static SANITIZEcode msdosify(char ** const sanitized, const char *file_name,
          and a filename cannot have more than a single dot. We leave the
          first non-leading dot alone, unless it comes too close to the
          beginning of the name: we want sh.lex.c to become sh_lex.c, not
-         sh.lex-c.  */
+         sh.lex-c. */
       else if(*s == '.') {
         if((flags & SANITIZE_ALLOW_PATH) && idx == 0 &&
            (s[1] == '/' || s[1] == '\\' ||
             (s[1] == '.' && (s[2] == '/' || s[2] == '\\')))) {
-          /* Copy "./" and "../" verbatim.  */
+          /* Copy "./" and "../" verbatim. */
           *d++ = *s++;
           if(d == dlimit)
             break;
@@ -225,7 +225,7 @@ static SANITIZEcode msdosify(char ** const sanitized, const char *file_name,
           *d = 'x';
         }
         else {
-          /* libg++ etc.  */
+          /* libg++ etc. */
           if(dlimit - d < 4) {
             *d++ = 'x';
             if(d == dlimit)
@@ -326,7 +326,7 @@ static SANITIZEcode rename_if_reserved_dos(char ** const sanitized,
      Examples: CON => _CON, CON.EXT => CON_EXT, CON:ADS => CON_ADS
      https://web.archive.org/web/20160314141551/support.microsoft.com/en-us/kb/74496
      https://learn.microsoft.com/windows/win32/fileio/naming-a-file
-     */
+   */
   for(p = buffer; p; p = (p == buffer && buffer != base ? base : NULL)) {
     size_t p_len;
     int x = (curl_strnequal(p, "CON", 3) ||
index 511a48bf036a062c02bec4ebd1f7a1e65d4f7add..e30a4ad81573a4800e0611b85c44e49652446cd3 100644 (file)
@@ -456,7 +456,7 @@ UNITTEST ParameterError parse_cert_parameter(const char *cert_parameter,
 #ifdef _WIN32
       if((param_place == &cert_parameter[1]) &&
          (cert_parameter[2] == '\\' || cert_parameter[2] == '/') &&
-         (ISALPHA(cert_parameter[0]))) {
+         ISALPHA(cert_parameter[0])) {
         /* colon in the second column, followed by a backslash, and the
            first character is an alphabetic letter:
 
@@ -559,7 +559,7 @@ static const struct sizeunit *getunit(char unit)
    We support P, T, G, M and K (case insensitive) suffixes.
 
    Unit test 1623
 */
+ */
 UNITTEST ParameterError GetSizeParameter(const char *arg, curl_off_t *out)
 {
   const char *unit = arg;
@@ -1016,7 +1016,7 @@ static ParameterError set_rate(const char *nextarg)
      /m == per minute
      /h == per hour (default)
      /d == per day (24 hours)
-  */
+   */
   ParameterError err = PARAM_OK;
   const char *p = nextarg;
   curl_off_t denominator;
@@ -1256,7 +1256,7 @@ static ParameterError parse_ech(struct OperationConfig *config,
         warnf("Could not read file \"%s\" "
               "specified for \"--ech ecl:\" option",
               nextarg);
-        return PARAM_BAD_USE; /*  */
+        return PARAM_BAD_USE;
       }
       err = file2string(&tmpcfg, file);
       if(file != stdin)
@@ -2791,7 +2791,7 @@ static ParameterError opt_string(struct OperationConfig *config,
     /* use <eth0> or <192.168.10.10> style addresses. Anything except
        this will make us try to get the "default" address.
        NOTE: this is a changed behavior since the released 4.1!
-    */
+     */
     err = getstr(&config->ftpport, nextarg, DENY_BLANK);
     break;
   case C_FTP_SSL_CCC_MODE: /* --ftp-ssl-ccc-mode */
@@ -2809,11 +2809,11 @@ static ParameterError opt_string(struct OperationConfig *config,
     err = add2list(&config->telnet_options, nextarg);
     break;
   case C_USER: /* --user */
-    /* user:password  */
+    /* user:password */
     err = getstr(&config->userpwd, nextarg, ALLOW_BLANK);
     break;
   case C_PROXY_USER: /* --proxy-user */
-    /* Proxy user:password  */
+    /* Proxy user:password */
     err = getstr(&config->proxyuserpwd, nextarg, ALLOW_BLANK);
     break;
   case C_WRITE_OUT: /* --write-out */
index d5421136c47bd76206ba0dd92c108527eceee108..f5910f404e77a43a7f19f862e298e3cce0031e85 100644 (file)
@@ -209,7 +209,8 @@ ParameterError parseconfig(const char *filename, int max_recursive,
       }
 
 #ifdef DEBUG_CONFIG
-      curl_mfprintf(tool_stderr, "PARAM: \"%s\"\n",(param ? param : "(null)"));
+      curl_mfprintf(tool_stderr, "PARAM: \"%s\"\n",
+                    (param ? param : "(null)"));
 #endif
       res = getparameter(option, param, &usedarg, config, max_recursive);
       config = global->last;
index f9389b48e543061a07584b6aae78059b0833b7dd..cbd97c4e234091efd6cbdfaf9e290616bee1f861 100644 (file)
@@ -93,7 +93,7 @@ static CURLcode glob_set(struct URLGlob *glob, const char **patternp,
 {
   /* processes a set expression with the point behind the opening '{'
      ','-separated elements are collected until the next closing '}'
-  */
+   */
   struct URLPattern *pat;
   bool done = FALSE;
   const char *pattern = *patternp;
@@ -217,7 +217,7 @@ static CURLcode glob_range(struct URLGlob *glob, const char **patternp,
      - num range: e.g. "0-9]", "17-2000]"
      - num range with leading zeros: e.g. "001-999]"
      expression is checked for well-formedness and collected until the next ']'
-  */
+   */
   struct URLPattern *pat;
   const char *pattern = *patternp;
   const char *c;
@@ -460,7 +460,7 @@ static CURLcode glob_parse(struct URLGlob *glob, const char *pattern,
       curlx_dyn_reset(&glob->buf);
     }
     else {
-      if(!*pattern) /* done  */
+      if(!*pattern) /* done */
         break;
       else if(*pattern == '{') {
         /* process set pattern */
index 71606f3d66c5e20a20d88523e2ad4129596f2686..74eb210ab54658fed417d735f49933ff09e485f6 100644 (file)
@@ -97,7 +97,7 @@ void vms_special_exit(int code, int vms_show)
 #endif
 
   if(code > CURL_LAST) {   /* If CURL_LAST exceeded then */
-    vms_code = CURL_LAST;  /* curlmsg.h is out of sync.  */
+    vms_code = CURL_LAST;  /* curlmsg.h is out of sync. */
   }
   else {
     vms_code = vms_cond[code] | vms_show;
index f0a3b9aded22318333fd5d236a3b1894a7a9a31d..f19a7ee4e1dcb0792e268c9c9a26e8612b74aa4d 100644 (file)
@@ -322,7 +322,7 @@ static CURLcode empty_multi_test(void)
 
   multi_init(multi);
 
-  /* calling curl_multi_waitfds() on an empty multi handle.  */
+  /* calling curl_multi_waitfds() on an empty multi handle. */
   mresult = curl_multi_waitfds(multi, ufds, 10, &fd_count);
 
   if(mresult != CURLM_OK) {
index 72bfce4294d58dd212149c2e66b52f014b65228e..b8ff7ef06cc18bdc831282fca461631a57cd48a7 100755 (executable)
@@ -330,15 +330,15 @@ static bool bad_long(CURLcode res, int check)
 static bool bad_neg(int check)
 {
   switch(check) {
-    case CURLOPT_DNS_CACHE_TIMEOUT:
-    case CURLOPT_INFILESIZE:
-    case CURLOPT_INFILESIZE_LARGE:
-    case CURLOPT_MAXREDIRS:
-    case CURLOPT_POSTFIELDSIZE:
-    case CURLOPT_POSTFIELDSIZE_LARGE:
-    case CURLOPT_RESUME_FROM:
-    case CURLOPT_RESUME_FROM_LARGE:
-      return TRUE;
+  case CURLOPT_DNS_CACHE_TIMEOUT:
+  case CURLOPT_INFILESIZE:
+  case CURLOPT_INFILESIZE_LARGE:
+  case CURLOPT_MAXREDIRS:
+  case CURLOPT_POSTFIELDSIZE:
+  case CURLOPT_POSTFIELDSIZE_LARGE:
+  case CURLOPT_RESUME_FROM:
+  case CURLOPT_RESUME_FROM_LARGE:
+    return TRUE;
   }
   return FALSE;
 }
index 3cccb6ed7f71d595885146bc08a76f4e284191ed..813052cb70bd74ea42853efd1f17283af838cf82 100755 (executable)
@@ -146,7 +146,7 @@ elsif($ARGV[0] eq "postprocess") {
         }
         close(IN);
 
-        @canondir = sort {substr($a,57) cmp substr($b,57)} @canondir;
+        @canondir = sort {substr($a, 57) cmp substr($b, 57)} @canondir;
         my $newfile = $logfile . ".new";
         open(OUT, ">$newfile") || die "$!";
         print OUT join('', @canondir);
index d33f56419a20d5353cb1a08ff4485c232b7406f9..e9a847c8cf69297d44a6cbd3114656ca60ed5988 100644 (file)
@@ -154,7 +154,6 @@ sub memanalyze {
 
                     $sizeataddr{$addr}=-1; # set -1 to mark as freed
                     $getmem{$addr}="$source:$linenum";
-
                 }
             }
             elsif($function =~ /malloc\((\d*)\) = 0x([0-9a-f]*)/) {
@@ -380,7 +379,6 @@ sub memanalyze {
                     push @res, "FREEADDRINFO ($source:$linenum)\n";
                 }
             }
-
         }
         else {
             push @res, "Not recognized prefix line: $line\n";
index e8612d27567f39d317b2a044e95d44d9bfe5041d..28eb0bd7992d126826446ae15ddba273177d0aa7 100755 (executable)
@@ -1447,7 +1447,6 @@ sub singletest_check {
         }
 
         $ok .= "p";
-
     }
     else {
         $ok .= "-"; # protocol not checked
@@ -1609,7 +1608,6 @@ sub singletest_check {
         }
 
         $ok .= "P";
-
     }
     else {
         $ok .= "-"; # proxy not checked
index f9bff8d5f385a5e14c5d935490a4623718c26994..8a4840ce69b4cd4904c478ec9e0aa4a48432033f 100644 (file)
@@ -519,7 +519,6 @@ static curl_socket_t sockit(curl_socket_t fd)
     rep = s_config.connectrep;
   }
 
-  /* */
   response[SOCKS5_VERSION] = s_config.responseversion;
 
   /*
index 0cc13874ccac2a8f3d05f5ec2b19166456d8048c..f45afe9f309b2a4d7222e59dc5683aeb2a2961f1 100644 (file)
@@ -311,7 +311,7 @@ sub serverfortest {
             push @lprotocols, "dns";
 
             if(! grep /^\Q$server\E$/, @lprotocols) {
-                if(substr($server,0,5) ne "socks") {
+                if(substr($server, 0, 5) ne "socks") {
                     if($tlsext) {
                         return ("curl lacks $tlsext support", 4);
                     }
index 8b0cda8820671f2ecd753b132de0a8a144c6bc2a..c1e4651420c7a5d6de43b63af7ccdc34d1240303 100755 (executable)
@@ -279,7 +279,6 @@ while(<$r>) {
             push @toolhelp, $combo;
             $opts{$combo} |= 4;
         }
-
     }
 }
 close($r);
index b434462febda6d90a728de1dceef7d3ca2db753c..4a94b6975eb9fbfd80b4827c71d40d6f17b1d952 100644 (file)
@@ -315,7 +315,7 @@ static CURLcode test_unit1664(const char *arg)
     /* CURL_OFF_T is typically 9223372036854775807 */
     static const char *nums[] = {
       "9223372036854775807", /* 2^63 -1 */
-      "9223372036854775808", /* 2^63  */
+      "9223372036854775808", /* 2^63 */
       "18446744073709551615", /* 2^64 - 1 */
       "18446744073709551616", /* 2^64 */
       "18446744073709551617", /* 2^64 + 1 */
@@ -429,7 +429,7 @@ static CURLcode test_unit1664(const char *arg)
     /* CURL_OFF_T is typically 2^63-1 */
     static const char *nums[] = {
       "777777777777777777777", /* 2^63 -1 */
-      "1000000000000000000000", /* 2^63  */
+      "1000000000000000000000", /* 2^63 */
       "111111111111111111111",
       "222222222222222222222",
       "333333333333333333333",
@@ -453,7 +453,7 @@ static CURLcode test_unit1664(const char *arg)
     /* CURL_OFF_T is typically 2^63-1 */
     static const char *nums[] = {
       "7FFFFFFFFFFFFFFF", /* 2^63 -1 */
-      "8000000000000000", /* 2^63  */
+      "8000000000000000", /* 2^63 */
       "1111111111111111",
       "2222222222222222",
       "3333333333333333",
index a0e6eadf1037be1d0193a2d3287d7368a6fbb5c2..97d4caed96e6afcec2e79275b015db768f4a5fcb 100644 (file)
@@ -360,17 +360,17 @@ static CURLcode test_unit2600(const char *arg)
     /* CNCT   HE      v4    v6     v4 v6      MIN   MAX */
     { 1, TURL, "test.com:123:192.0.2.1", CURL_IPRESOLVE_WHATEVER,
       CNCT_TMOT, 150, 250,  250,    1,  0,      200,  TC_TMOT,  R_FAIL, NULL },
-    /* 1 ipv4, fails after ~200ms, reports COULDNT_CONNECT   */
+    /* 1 ipv4, fails after ~200ms, reports COULDNT_CONNECT */
     { 2, TURL, "test.com:123:192.0.2.1,192.0.2.2", CURL_IPRESOLVE_WHATEVER,
       CNCT_TMOT, 150, 250,  250,    2,  0,      400,  TC_TMOT,  R_FAIL, NULL },
-    /* 2 ipv4, fails after ~400ms, reports COULDNT_CONNECT   */
+    /* 2 ipv4, fails after ~400ms, reports COULDNT_CONNECT */
 #ifdef USE_IPV6
     { 3, TURL, "test.com:123:::1", CURL_IPRESOLVE_WHATEVER,
       CNCT_TMOT, 150, 250,  250,    0,  1,      200,  TC_TMOT,  R_FAIL, NULL },
-    /* 1 ipv6, fails after ~200ms, reports COULDNT_CONNECT   */
+    /* 1 ipv6, fails after ~200ms, reports COULDNT_CONNECT */
     { 4, TURL, "test.com:123:::1,::2", CURL_IPRESOLVE_WHATEVER,
       CNCT_TMOT, 150, 250,  250,    0,  2,      400,  TC_TMOT,  R_FAIL, NULL },
-    /* 2 ipv6, fails after ~400ms, reports COULDNT_CONNECT   */
+    /* 2 ipv6, fails after ~400ms, reports COULDNT_CONNECT */
     { 5, TURL, "test.com:123:192.0.2.1,::1", CURL_IPRESOLVE_WHATEVER,
       CNCT_TMOT, 150, 250, 250,     1,  1,      350,  TC_TMOT,  R_FAIL, "v6" },
     /* mixed ip4+6, v6 always first, v4 kicks in on HE, fails after ~350ms */