]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: miscellaneous
authorViktor Szakats <commit@vsz.me>
Fri, 23 Jan 2026 11:59:42 +0000 (12:59 +0100)
committerViktor Szakats <commit@vsz.me>
Sat, 31 Jan 2026 23:54:23 +0000 (00:54 +0100)
- INSTALL-CMAKE.md: add missing periods, text fixes.
- md4, md5: sync variables names.
- curl_trc: sync an argument type.
- docs/examples: sync debug/trace function copies, constify, tidy-ups.
- replace commented code with `#if 0`.
- drop redundant parenthesis (macro values, `return`, around single
  variables, function calls).
- fix indentation, apply clang-format in places.

Closes #20481

62 files changed:
CMakeLists.txt
docs/INSTALL-CMAKE.md
docs/examples/block_ip.c
docs/examples/debug.c
docs/examples/ftp-wildcard.c
docs/examples/ftpgetinfo.c
docs/examples/ghiper.c
docs/examples/hiperfifo.c
docs/examples/http2-download.c
docs/examples/http2-serverpush.c
docs/examples/http2-upload.c
docs/examples/multi-debugcallback.c
docs/examples/sendrecv.c
docs/examples/sftpuploadresume.c
docs/examples/smooth-gtk-thread.c
lib/arpa_telnet.h
lib/asyn-ares.c
lib/cf-h2-proxy.c
lib/cf-ip-happy.c
lib/config-win32.h
lib/conncache.c
lib/cookie.c
lib/cshutdn.c
lib/curl_addrinfo.c
lib/curl_fopen.c
lib/curl_get_line.c
lib/curl_ntlm_core.c
lib/curl_setup_once.h
lib/curl_share.h
lib/curl_trc.c
lib/easy.c
lib/http_aws_sigv4.c
lib/imap.c
lib/md4.c
lib/md5.c
lib/pop3.c
lib/request.c
lib/setup-win32.h
lib/smtp.c
lib/transfer.c
lib/url.c
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_quiche.c
lib/ws.c
projects/vms/curl_crtl_init.c
src/terminal.c
src/tool_doswin.c
src/tool_getparam.c
src/tool_ipfs.c
src/tool_operhlp.c
src/tool_setopt.c
src/tool_urlglob.c
src/tool_vms.h
tests/libtest/cli_hx_download.c
tests/libtest/cli_upload_pausing.c
tests/libtest/lib1509.c
tests/libtest/lib1517.c
tests/libtest/lib1556.c
tests/libtest/lib518.c
tests/libtest/lib537.c
tests/libtest/lib571.c
tests/server/dnsd.c

index 9c40a4e8ab17bc46ef325a8299c1d50d0229ad20..4ff6ce4b5b856babaaa7163f736986eb3af870f4 100644 (file)
@@ -1746,7 +1746,7 @@ if(NOT WIN32 AND NOT CMAKE_CROSSCOMPILING)
     {
       (void)argc;
       argv[0][0] = ' ';
-      return (argv[0][0] == ' ')?0:1;
+      return (argv[0][0] == ' ') ? 0 : 1;
     }" HAVE_WRITABLE_ARGV)
 endif()
 
index 79222ba9e192a5d41a1fa99d637802e9916716a2..b95792d8d0501df893bc3e54dfa21d7d8078253d 100644 (file)
@@ -511,8 +511,8 @@ Examples:
 
 ## Feature detection variables
 
-By default this CMake build script detects the version of some dependencies
-using `check_symbol_exists`. Those checks do not work in the case that both
+By default the curl CMake build script detects the version of some dependencies
+using `check_symbol_exists()`. Those checks do not work in the case that both
 CURL and its dependency are included as sub-projects in a larger build using
 `FetchContent`. To support that case, additional variables may be defined by
 the parent project, ideally in the "extra" find package redirect file:
@@ -559,13 +559,13 @@ Note: These variables are internal and subject to change.
 - `curl-examples`:          Build examples
                             Individual targets: `curl-example-<name>`,
                             where <name> is the .c filename without extension.
-- `curl-examples-build`:    Build examples quickly but without the ability to run them (for build tests)
-- `curl-man`:               Build man pages (built by default unless disabled)
-- `curl_uninstall`:         Uninstall curl
-- `curl-completion-fish`:   Build shell completions for fish (built by default if enabled)
-- `curl-completion-zsh`:    Build shell completions for zsh (built by default if enabled)
-- `curl-ca-bundle`:         Build the CA bundle via `scripts/mk-ca-bundle.pl`
-- `curl-ca-firefox`:        Build the CA bundle via `scripts/firefox-db2pem.sh`
+- `curl-examples-build`:    Build examples quickly but without the ability to run them. (for build tests)
+- `curl-man`:               Build man pages. (built by default unless disabled)
+- `curl_uninstall`:         Uninstall curl.
+- `curl-completion-fish`:   Build shell completions for fish. (built by default if enabled)
+- `curl-completion-zsh`:    Build shell completions for zsh. (built by default if enabled)
+- `curl-ca-bundle`:         Build the CA bundle via `scripts/mk-ca-bundle.pl`.
+- `curl-ca-firefox`:        Build the CA bundle via `scripts/firefox-db2pem.sh`.
 - `curl-lint`:              Run lint checks.
 - `curl-listcats`:          Generate help category constants for `src/tool_help.h` from documentation.
 - `curl-listhelp`:          Generate `src/tool_listhelp.c` from documentation.
index 12ca988bbd2425a568a2c354f754165a2b7eb72a..f4a282756753890896303f42b143e45a80b866bd 100644 (file)
@@ -229,8 +229,7 @@ static int is_ipv4_mapped_ipv6_address(int family, void *netaddr)
 }
 #endif /* AF_INET6 */
 
-static curl_socket_t opensocket(void *clientp,
-                                curlsocktype purpose,
+static curl_socket_t opensocket(void *clientp, curlsocktype purpose,
                                 struct curl_sockaddr *address)
 {
   /* filter the address */
index e49910a5fc0b1764e6ae51978eab7f4f5ebd4ce3..98457d53b240e18d074bf0669184ae22dfbfd9ab 100644 (file)
@@ -33,7 +33,7 @@ struct data {
   char trace_ascii; /* 1 or 0 */
 };
 
-static void dump(const char *text, FILE *stream, unsigned char *ptr,
+static void dump(const char *text, const unsigned char *ptr,
                  size_t size, char nohex)
 {
   size_t i;
@@ -45,20 +45,20 @@ static void dump(const char *text, FILE *stream, unsigned char *ptr,
     /* without the hex output, we can fit more on screen */
     width = 0x40;
 
-  fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
+  fprintf(stderr, "%s, %10.10lu bytes (0x%8.8lx)\n",
           text, (unsigned long)size, (unsigned long)size);
 
   for(i = 0; i < size; i += width) {
 
-    fprintf(stream, "%4.4lx: ", (unsigned long)i);
+    fprintf(stderr, "%4.4lx: ", (unsigned long)i);
 
     if(!nohex) {
       /* hex not disabled, show it */
       for(c = 0; c < width; c++)
         if(i + c < size)
-          fprintf(stream, "%02x ", ptr[i + c]);
+          fprintf(stderr, "%02x ", ptr[i + c]);
         else
-          fputs("   ", stream);
+          fputs("   ", stderr);
     }
 
     for(c = 0; (c < width) && (i + c < size); c++) {
@@ -68,7 +68,7 @@ static void dump(const char *text, FILE *stream, unsigned char *ptr,
         i += (c + 2 - width);
         break;
       }
-      fprintf(stream, "%c",
+      fprintf(stderr, "%c",
               (ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
       /* check again for 0D0A, to avoid an extra \n if it is at width */
       if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
@@ -77,9 +77,8 @@ static void dump(const char *text, FILE *stream, unsigned char *ptr,
         break;
       }
     }
-    fputc('\n', stream); /* newline */
+    fputc('\n', stderr); /* newline */
   }
-  fflush(stream);
 }
 
 static int my_trace(CURL *curl, curl_infotype type,
@@ -115,7 +114,7 @@ static int my_trace(CURL *curl, curl_infotype type,
     return 0;
   }
 
-  dump(text, stderr, (unsigned char *)data, size, config->trace_ascii);
+  dump(text, (const unsigned char *)data, size, config->trace_ascii);
   return 0;
 }
 
index cba40d6eb8ac795997a1f932148ca311369675d1..4cade8d174bed71c5e3d5b7b5ca7e03ab777ba9e 100644 (file)
@@ -133,7 +133,9 @@ int main(int argc, char **argv)
   curl_easy_setopt(curl, CURLOPT_CHUNK_DATA, &data);
   curl_easy_setopt(curl, CURLOPT_WRITEDATA, &data);
 
-  /* curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); */
+#if 0
+  curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+#endif
 
   /* set a URL containing wildcard pattern (only in the last part) */
   if(argc == 2)
index 82861c21a8397a36dbc6075c4d634b802ecde9a9..cdabff1157490e599613101028a43a5e967ec47a 100644 (file)
@@ -47,7 +47,8 @@ static size_t throw_away(void *ptr, size_t size, size_t nmemb, void *data)
 
 int main(void)
 {
-  char ftpurl[] = "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
+  static const char ftpurl[] =
+    "ftp://ftp.example.com/gnu/binutils/binutils-2.19.1.tar.bz2";
   CURL *curl;
   CURLcode result;
   long filetime = -1;
@@ -68,7 +69,9 @@ int main(void)
     curl_easy_setopt(curl, CURLOPT_HEADERFUNCTION, throw_away);
     curl_easy_setopt(curl, CURLOPT_HEADER, 0L);
     /* Switch on full protocol/debug output */
-    /* curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L); */
+#if 0
+    curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
+#endif
 
     result = curl_easy_perform(curl);
 
index 6a7c25aa8b1097e069f92dbefb0ea1a9dc74228e..522f69a05421befc0256d463f38217ee66369f02 100644 (file)
@@ -158,8 +158,8 @@ static gboolean timer_cb(gpointer data)
   struct GlobalInfo *g = (struct GlobalInfo *)data;
   CURLMcode mresult;
 
-  mresult = curl_multi_socket_action(g->multi,
-                                CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+  mresult = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0,
+                                     &g->still_running);
   mcode_or_die("timer_cb: curl_multi_socket_action", mresult);
   check_multi_info(g);
   return FALSE;
@@ -360,7 +360,7 @@ static gboolean fifo_cb(GIOChannel *ch, GIOCondition condition, gpointer data)
     }
     else {
       buf = g_malloc(BUF_SIZE + 1);
-      while(TRUE) {
+      for(;;) {
         buf[BUF_SIZE] = '\0';
         g_io_channel_read_chars(ch, buf, BUF_SIZE, &len, &err);
         if(len) {
index 2331c086477ae82cfaca33d84c65dcd2dcf107d9..dccd4f6274643ee83800ee1bbeea6b1b58d059ae 100644 (file)
@@ -220,8 +220,8 @@ static void timer_cb(int fd, short kind, void *userp)
   (void)fd;
   (void)kind;
 
-  mresult = curl_multi_socket_action(g->multi,
-                                  CURL_SOCKET_TIMEOUT, 0, &g->still_running);
+  mresult = curl_multi_socket_action(g->multi, CURL_SOCKET_TIMEOUT, 0,
+                                     &g->still_running);
   mcode_or_die("timer_cb: curl_multi_socket_action", mresult);
   check_multi_info(g);
 }
index a9a0a8a9f7b2be204821940d056000a7a61b83bd..8f97b84f969e695561a4d11931adf036fd364f3b 100644 (file)
@@ -55,7 +55,7 @@ struct transfer {
   int num;
 };
 
-static void dump(const char *text, int num, unsigned char *ptr,
+static void dump(const char *text, int num, const unsigned char *ptr,
                  size_t size, char nohex)
 {
   size_t i;
@@ -136,7 +136,7 @@ static int my_trace(CURL *curl, curl_infotype type,
     return 0;
   }
 
-  dump(text, num, (unsigned char *)data, size, 1);
+  dump(text, num, (const unsigned char *)data, size, 1);
   return 0;
 }
 
index e646ce1e4b6c32051e39a163434c9fdd9a678d78..e570f2ed3109df79edf7d5342fc404657b894e47 100644 (file)
@@ -47,7 +47,8 @@
 
 static FILE *out_download;
 
-static void dump(const char *text, unsigned char *ptr, size_t size, char nohex)
+static void dump(const char *text, const unsigned char *ptr,
+                 size_t size, char nohex)
 {
   size_t i;
   size_t c;
@@ -126,7 +127,7 @@ static int my_trace(CURL *curl, curl_infotype type,
     return 0;
   }
 
-  dump(text, (unsigned char *)data, size, 1);
+  dump(text, (const unsigned char *)data, size, 1);
   return 0;
 }
 
index 1ebc993bfd6f42ce9bfaa61fdb45bfd371fa17ba..d0081cc49b938573d6856d9c0db01cfa83486825 100644 (file)
@@ -73,7 +73,7 @@ static int my_gettimeofday(struct timeval *tp, void *tzp)
   (void)tzp;
   if(tp) {
 /* Offset between 1601-01-01 and 1970-01-01 in 100 nanosec units */
-#define WIN32_FT_OFFSET (116444736000000000)
+#define WIN32_FT_OFFSET 116444736000000000
     union {
       CURL_TYPEOF_CURL_OFF_T ns100; /* time since 1 Jan 1601 in 100ns units */
       FILETIME ft;
@@ -191,7 +191,7 @@ static int my_trace(CURL *curl, curl_infotype type,
     return 0;
   }
 
-  dump(text, num, (unsigned char *)data, size, 1);
+  dump(text, num, (const unsigned char *)data, size, 1);
   return 0;
 }
 
index 3798f541b23319259e67f018c060b81485e8c757..05e51f9a4fa7936d5d0b67628ab81f44be993128 100644 (file)
@@ -30,9 +30,7 @@
 
 #include <curl/curl.h>
 
-#define TRUE 1
-
-static void dump(const char *text, FILE *stream, const unsigned char *ptr,
+static void dump(const char *text, const unsigned char *ptr,
                  size_t size, char nohex)
 {
   size_t i;
@@ -44,20 +42,20 @@ static void dump(const char *text, FILE *stream, const unsigned char *ptr,
     /* without the hex output, we can fit more on screen */
     width = 0x40;
 
-  fprintf(stream, "%s, %10.10lu bytes (0x%8.8lx)\n",
+  fprintf(stderr, "%s, %10.10lu bytes (0x%8.8lx)\n",
           text, (unsigned long)size, (unsigned long)size);
 
   for(i = 0; i < size; i += width) {
 
-    fprintf(stream, "%4.4lx: ", (unsigned long)i);
+    fprintf(stderr, "%4.4lx: ", (unsigned long)i);
 
     if(!nohex) {
       /* hex not disabled, show it */
       for(c = 0; c < width; c++)
         if(i + c < size)
-          fprintf(stream, "%02x ", ptr[i + c]);
+          fprintf(stderr, "%02x ", ptr[i + c]);
         else
-          fputs("   ", stream);
+          fputs("   ", stderr);
     }
 
     for(c = 0; (c < width) && (i + c < size); c++) {
@@ -67,7 +65,7 @@ static void dump(const char *text, FILE *stream, const unsigned char *ptr,
         i += (c + 2 - width);
         break;
       }
-      fprintf(stream, "%c",
+      fprintf(stderr, "%c",
               (ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80) ? ptr[i + c] : '.');
       /* check again for 0D0A, to avoid an extra \n if it is at width */
       if(nohex && (i + c + 2 < size) && ptr[i + c + 1] == 0x0D &&
@@ -76,14 +74,12 @@ static void dump(const char *text, FILE *stream, const unsigned char *ptr,
         break;
       }
     }
-    fputc('\n', stream); /* newline */
+    fputc('\n', stderr); /* newline */
   }
-  fflush(stream);
 }
 
 static int my_trace(CURL *curl, curl_infotype type,
-                    unsigned char *data, size_t size,
-                    void *userp)
+                    char *data, size_t size, void *userp)
 {
   const char *text;
 
@@ -110,7 +106,7 @@ static int my_trace(CURL *curl, curl_infotype type,
     return 0;
   }
 
-  dump(text, stderr, data, size, TRUE);
+  dump(text, (const unsigned char *)data, size, 1);
   return 0;
 }
 
index 5e4ef10b05e8c7c263637c01cd1f053c07f468c7..deadefa21e2a1cf08e035ab4970be99c4c1478f0 100644 (file)
@@ -125,7 +125,7 @@ int main(void)
       do {
         nsent = 0;
         result = curl_easy_send(curl, request + nsent_total,
-                             request_len - nsent_total, &nsent);
+                                request_len - nsent_total, &nsent);
         nsent_total += nsent;
 
         if(result == CURLE_AGAIN && !wait_on_socket(sockfd, 0, 60000L)) {
index 02f18897a31c80395e9d4d18709d5bd661de790a..ea5146e87904e30b180b0b01dcd80ae9700d6546 100644 (file)
@@ -72,7 +72,7 @@ static curl_off_t sftpGetRemoteFileSize(const char *i_remoteFile)
     result = curl_easy_perform(curl);
     if(CURLE_OK == result) {
       result = curl_easy_getinfo(curl, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T,
-                              &remoteFileSizeByte);
+                                 &remoteFileSizeByte);
       if(result)
         return -1;
       printf("filesize: %" CURL_FORMAT_CURL_OFF_T "\n", remoteFileSizeByte);
index 1c9951dfceeb58172b21905d0458c19cad238ab7..c82e0c57bf6d09d29d03845c602e73b15e17c4bd 100644 (file)
@@ -152,7 +152,9 @@ static void *create_thread(void *progress_bar)
   gtk_widget_destroy(progress_bar);
 
   /* [Un]Comment this out to kill the program rather than pushing close. */
-  /* gtk_main_quit(); */
+#if 0
+  gtk_main_quit();
+#endif
 
   return NULL;
 }
index 98d750daa86d80957abb96d45331df23f008a66c..329f4bcd1c5414f5c28b7767725e1cbd3e98aaae 100644 (file)
 /*
  * Telnet option defines. Add more here if in need.
  */
-#define CURL_TELOPT_BINARY   0  /* binary 8-bit data */
-#define CURL_TELOPT_ECHO     1  /* just echo! */
-#define CURL_TELOPT_SGA      3  /* Suppress Go Ahead */
-#define CURL_TELOPT_EXOPL  255  /* EXtended OPtions List */
-#define CURL_TELOPT_TTYPE   24  /* Terminal TYPE */
-#define CURL_TELOPT_NAWS    31  /* Negotiate About Window Size */
-#define CURL_TELOPT_XDISPLOC 35 /* X DISPlay LOCation */
-
+#define CURL_TELOPT_BINARY      0   /* binary 8-bit data */
+#define CURL_TELOPT_ECHO        1   /* just echo! */
+#define CURL_TELOPT_SGA         3   /* Suppress Go Ahead */
+#define CURL_TELOPT_EXOPL       255 /* EXtended OPtions List */
+#define CURL_TELOPT_TTYPE       24  /* Terminal TYPE */
+#define CURL_TELOPT_NAWS        31  /* Negotiate About Window Size */
+#define CURL_TELOPT_XDISPLOC    35  /* X DISPlay LOCation */
 #define CURL_TELOPT_NEW_ENVIRON 39  /* NEW ENVIRONment variables */
 #define CURL_NEW_ENV_VAR   0
 #define CURL_NEW_ENV_VALUE 1
@@ -55,9 +54,9 @@ static const char * const telnetoptions[] = {
   "TERM SPEED",  "LFLOW",          "LINEMODE",      "XDISPLOC",
   "OLD-ENVIRON", "AUTHENTICATION", "ENCRYPT",       "NEW-ENVIRON"
 };
-#define CURL_TELOPT(x)    telnetoptions[x]
+#define CURL_TELOPT(x) telnetoptions[x]
 #else
-#define CURL_TELOPT(x)    ""
+#define CURL_TELOPT(x) ""
 #endif
 
 #define CURL_TELOPT_MAXIMUM CURL_TELOPT_NEW_ENVIRON
@@ -101,13 +100,14 @@ static const char * const telnetcmds[] = {
 #define CURL_TELQUAL_INFO 2
 #define CURL_TELQUAL_NAME 3
 
-#define CURL_TELCMD_OK(x)  (((unsigned int)(x) >= CURL_TELCMD_MINIMUM) && \
-                            ((unsigned int)(x) <= CURL_TELCMD_MAXIMUM))
+#define CURL_TELCMD_OK(x)                        \
+  (((unsigned int)(x) >= CURL_TELCMD_MINIMUM) && \
+   ((unsigned int)(x) <= CURL_TELCMD_MAXIMUM))
 
 #ifdef CURLVERBOSE
-#define CURL_TELCMD(x)    telnetcmds[(x) - CURL_TELCMD_MINIMUM]
+#define CURL_TELCMD(x) telnetcmds[(x) - CURL_TELCMD_MINIMUM]
 #else
-#define CURL_TELCMD(x)    ""
+#define CURL_TELCMD(x) ""
 #endif
 
 #endif /* CURL_DISABLE_TELNET */
index df8a603cc47dc1055efc64bc36b9feca2e86e7ad..0d4a28d8348670b9b9a0afb637ac4266fdc0aedd 100644 (file)
@@ -309,7 +309,7 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data,
      (ares->happy_eyeballs_dns_time.tv_sec ||
       ares->happy_eyeballs_dns_time.tv_usec) &&
      (curlx_ptimediff_ms(Curl_pgrs_now(data),
-                        &ares->happy_eyeballs_dns_time) >=
+                         &ares->happy_eyeballs_dns_time) >=
       HAPPY_EYEBALLS_DNS_TIMEOUT)) {
     /* Remember that the EXPIRE_HAPPY_EYEBALLS_DNS timer is no longer
        running. */
@@ -743,8 +743,7 @@ CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, const char *hostname,
   ares->ares_status = ARES_ENOTFOUND;
   ares->result = CURLE_OK;
 
-#if defined(CURLVERBOSE) && \
-  ARES_VERSION >= 0x011800  /* >= v1.24.0 */
+#if defined(CURLVERBOSE) && ARES_VERSION >= 0x011800 /* >= v1.24.0 */
   if(CURL_TRC_DNS_is_verbose(data)) {
     char *csv = ares_get_servers_csv(ares->channel);
     CURL_TRC_DNS(data, "asyn-ares: servers=%s", csv);
@@ -759,8 +758,7 @@ CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, const char *hostname,
     int pf = PF_INET;
     memset(&hints, 0, sizeof(hints));
 #ifdef CURLRES_IPV6
-    if((ip_version != CURL_IPRESOLVE_V4) &&
-       Curl_ipv6works(data)) {
+    if((ip_version != CURL_IPRESOLVE_V4) && Curl_ipv6works(data)) {
       /* The stack seems to be IPv6-enabled */
       if(ip_version == CURL_IPRESOLVE_V6)
         pf = PF_INET6;
index ff8254fd8045475428b2b13fd6ee234afdb4c4a8..d95716eaff9a5acdd1b25f40ad3d4511bbf7cffe 100644 (file)
@@ -226,8 +226,7 @@ static CURLcode proxy_h2_nw_out_writer(void *writer_ctx,
   if(cf) {
     struct Curl_easy *data = CF_DATA_CURRENT(cf);
     CURLcode result;
-    result = Curl_conn_cf_send(cf->next, data, buf, buflen,
-                               FALSE, pnwritten);
+    result = Curl_conn_cf_send(cf->next, data, buf, buflen, FALSE, pnwritten);
     CURL_TRC_CF(data, cf, "[0] nw_out_writer(len=%zu) -> %d, %zu",
                 buflen, result, *pnwritten);
     return result;
@@ -422,7 +421,7 @@ static ssize_t on_session_send(nghttp2_session *h2,
   if(!nwritten)
     return NGHTTP2_ERR_WOULDBLOCK;
 
-  return (nwritten  > SSIZE_MAX) ?
+  return (nwritten > SSIZE_MAX) ?
     NGHTTP2_ERR_CALLBACK_FAILURE : (ssize_t)nwritten;
 }
 
index 34cff8a67f781a4ffd78bc79f9b06fe5e04b4d07..01ddd9f3d890ee06d6f1227b06b40546d54f033e 100644 (file)
@@ -500,8 +500,8 @@ out:
     next_expire_ms = Curl_timeleft_ms(data);
     if(next_expire_ms < 0) {
       failf(data, "Connection timeout after %" FMT_OFF_T " ms",
-        curlx_ptimediff_ms(Curl_pgrs_now(data),
-                           &data->progress.t_startsingle));
+            curlx_ptimediff_ms(Curl_pgrs_now(data),
+                               &data->progress.t_startsingle));
       return CURLE_OPERATION_TIMEDOUT;
     }
 
index 4d509573cf63f9ee6b0d04a9cbc09dda67f22b5f..33484888ed390aea3211532c4681a2daf443f7ca 100644 (file)
  */
 
 /* Default define to enable threaded asynchronous DNS lookups. */
-#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \
-    !defined(USE_THREADS_WIN32)
+#if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && !defined(USE_THREADS_WIN32)
 #  define USE_THREADS_WIN32 1
 #endif
 
index d3072fb2aa63acd47ce0d9d867e0511d2257cce3..869af4215e457f74df665dbd044884758634ec36 100644 (file)
@@ -52,7 +52,7 @@
     }                                                                   \
   } while(0)
 
-#define CPOOL_UNLOCK(c,d)                                               \
+#define CPOOL_UNLOCK(c, d)                                              \
   do {                                                                  \
     if(c) {                                                             \
       DEBUGASSERT((c)->locked);                                         \
index 5d7cd133106a9597ed01406014117306e8f2530b..537bb7f1ed580f8ca5fb9657310763a01a4ce41d 100644 (file)
@@ -372,10 +372,10 @@ static bool invalid_octets(const char *ptr, size_t len)
 */
 #define MAX_DATE_LENGTH 80
 
-#define COOKIE_NAME 0
-#define COOKIE_VALUE 1
+#define COOKIE_NAME   0
+#define COOKIE_VALUE  1
 #define COOKIE_DOMAIN 2
-#define COOKIE_PATH 3
+#define COOKIE_PATH   3
 
 #define COOKIE_PIECES 4 /* the list above */
 
@@ -783,7 +783,7 @@ static bool is_public_suffix(struct Curl_easy *data,
    * dereference it.
    */
   DEBUGF(infof(data, "PSL check set-cookie '%s' for domain=%s in %s",
-         co->name, co->domain, domain));
+               co->name, co->domain, domain));
   if(data && (domain && co->domain && !Curl_host_is_ipnum(co->domain))) {
     bool acceptable = FALSE;
     char lcase[256];
@@ -814,7 +814,7 @@ static bool is_public_suffix(struct Curl_easy *data,
   (void)co;
   (void)domain;
   DEBUGF(infof(data, "NO PSL to check set-cookie '%s' for domain=%s in %s",
-         co->name, co->domain, domain));
+               co->name, co->domain, domain));
 #endif
   return FALSE;
 }
index 93182cc357b9346870a3f96fb44c210361199ab8..85863ef93051dd62fd01a46cc251a1f829d4bc49 100644 (file)
@@ -401,8 +401,8 @@ void Curl_cshutdn_add(struct cshutdn *cshutdn,
 
   /* Add the connection to our shutdown list for non-blocking shutdown
    * during multi processing. */
-  if(max_total > 0 && (max_total <=
-        (conns_in_pool + Curl_llist_count(&cshutdn->list)))) {
+  if(max_total > 0 &&
+     (max_total <= (conns_in_pool + Curl_llist_count(&cshutdn->list)))) {
     CURL_TRC_M(data, "[SHUTDOWN] discarding oldest shutdown connection "
                "due to connection limit of %zu", max_total);
     cshutdn_destroy_oldest(cshutdn, data, NULL);
index 7a1d406bc784d9b551ed9b1de52099976cca12f1..f1eaa6bcb604ac242c6504fbba601ca28a170454 100644 (file)
@@ -485,7 +485,7 @@ struct Curl_addrinfo *Curl_unix2addr(const char *path, bool *longpath,
 }
 #endif
 
-#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) &&  \
+#if defined(CURL_MEMDEBUG) && defined(HAVE_GETADDRINFO) && \
   defined(HAVE_FREEADDRINFO)
 /*
  * curl_dbg_freeaddrinfo()
index 3d5ee5002dbc11652c7b040c2ece43784de374f8..edd314a5cb7d7119e4151c6f459d1801ace629cd 100644 (file)
@@ -23,7 +23,7 @@
  ***************************************************************************/
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) ||  \
+#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \
   !defined(CURL_DISABLE_HSTS)
 
 #include "urldata.h"
index 46c1287924396e43b67937c7f07cfc8e74c5d0ca..f4328405c7ff8e96be1a152737ee9f3bd7472d2b 100644 (file)
  ***************************************************************************/
 #include "curl_setup.h"
 
-#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) ||  \
+#if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) || \
   !defined(CURL_DISABLE_HSTS) || !defined(CURL_DISABLE_NETRC)
 
 #include "curl_get_line.h"
 
-#define appendnl(b)  curlx_dyn_addn(buf, "\n", 1)
+#define appendnl(b) curlx_dyn_addn(buf, "\n", 1)
 
 /*
  * Curl_get_line() returns only complete whole lines that end with newline.
index 62599174a3c1fb48811a3cd13b5f2f79719eed3f..2e978d7ef3d983ff4ca198ae60fd19840929a72e 100644 (file)
 #    define DES_set_key_unchecked wolfSSL_DES_set_key_unchecked
 #    define DES_ecb_encrypt       wolfSSL_DES_ecb_encrypt
 #    define DESKEY(x)             ((WOLFSSL_DES_key_schedule *)(x))
-
-#    if defined(LIBWOLFSSL_VERSION_HEX) &&      \
-       (LIBWOLFSSL_VERSION_HEX >= 0x05007006)
+#    if defined(LIBWOLFSSL_VERSION_HEX) && LIBWOLFSSL_VERSION_HEX >= 0x05007006
 #      define DES_ENCRYPT WC_DES_ENCRYPT
 #      define DES_DECRYPT WC_DES_DECRYPT
 #    endif
-
 #  else
 #    define DESKEY(x) &x
 #  endif
@@ -340,7 +337,7 @@ void Curl_ntlm_core_lm_resp(const unsigned char *keys,
   des_encrypt(&des, 8, results + 8, plaintext);
   setup_des_key(keys + 14, &des);
   des_encrypt(&des, 8, results + 16, plaintext);
-#elif defined(USE_MBEDTLS_DES) || defined(USE_OS400CRYPTO) ||   \
+#elif defined(USE_MBEDTLS_DES) || defined(USE_OS400CRYPTO) || \
   defined(USE_WIN32_CRYPTO)
   encrypt_des(plaintext, results, keys);
   encrypt_des(plaintext, results + 8, keys + 7);
@@ -386,7 +383,7 @@ CURLcode Curl_ntlm_core_mk_lm_hash(const char *password,
     des_encrypt(&des, 8, lmbuffer, magic);
     setup_des_key(pw + 7, &des);
     des_encrypt(&des, 8, lmbuffer + 8, magic);
-#elif defined(USE_MBEDTLS_DES) || defined(USE_OS400CRYPTO) ||   \
+#elif defined(USE_MBEDTLS_DES) || defined(USE_OS400CRYPTO) || \
   defined(USE_WIN32_CRYPTO)
     encrypt_des(magic, lmbuffer, pw);
     encrypt_des(magic, lmbuffer + 8, pw + 7);
index 8cd21f1110b36f26080081a896d0bddbbc43e9eb..d00142fac22d72c5873e7d538e1fa828820a7f6e 100644 (file)
@@ -63,9 +63,9 @@
 /* Macro to strip 'const' without triggering a compiler warning.
    Use it for APIs that do not or cannot support the const qualifier. */
 #ifdef HAVE_UINTPTR_T
-#  define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
+#define CURL_UNCONST(p) ((void *)(uintptr_t)(const void *)(p))
 #else
-#  define CURL_UNCONST(p) ((void *)(p))  /* Fall back to simple cast */
+#define CURL_UNCONST(p) ((void *)(p))  /* Fall back to simple cast */
 #endif
 
 #ifdef USE_SCHANNEL
@@ -284,9 +284,9 @@ typedef unsigned int curl_bit;
  */
 #ifdef USE_WINSOCK
 #define SOCKERRNO         ((int)WSAGetLastError())
-#define SET_SOCKERRNO(x)  (WSASetLastError((int)(x)))
+#define SET_SOCKERRNO(x)  WSASetLastError((int)(x))
 #else
-#define SOCKERRNO         (errno)
+#define SOCKERRNO         errno
 #define SET_SOCKERRNO(x)  (errno = (x))
 #endif
 
index fcd9e32980e1b1a20134f704b49af81f5dc1033d..3fcaaecd4ad64586c5db922a04a1c4ceb7f92783 100644 (file)
@@ -36,8 +36,8 @@ struct Curl_ssl_scache;
 #define CURL_GOOD_SHARE 0x7e117a1e
 #define GOOD_SHARE_HANDLE(x) ((x) && (x)->magic == CURL_GOOD_SHARE)
 
-#define CURL_SHARE_KEEP_CONNECT(s)    \
-        ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
+#define CURL_SHARE_KEEP_CONNECT(s)                          \
+  ((s) && ((s)->specifier & (1 << CURL_LOCK_DATA_CONNECT)))
 
 /* this struct is libcurl-private, do not export details */
 struct Curl_share {
index c27fc742ed7858b5a3a70fb90e57ed2b14e4af61..bbec332f99d04b483abf3eac84d10c6c6d71916b 100644 (file)
@@ -580,7 +580,7 @@ static void trc_apply_level_by_name(struct Curl_str *token, int lvl)
   }
 }
 
-static void trc_apply_level_by_category(int category, int lvl)
+static void trc_apply_level_by_category(unsigned int category, int lvl)
 {
   size_t i;
 
index cc505b5b3f822f72ca93d8d3e012d45344d01e99..a441d0e4f6cbf4eabe9fc8edd7c1272ca3655f1b 100644 (file)
@@ -616,7 +616,9 @@ static CURLcode wait_or_timeout(struct Curl_multi *multi, struct events *ev)
     if(!pollrc) {
       /* timeout! */
       ev->ms = 0;
-      /* curl_mfprintf(stderr, "call curl_multi_socket_action(TIMEOUT)\n"); */
+#if 0
+      curl_mfprintf(stderr, "call curl_multi_socket_action(TIMEOUT)\n");
+#endif
       mresult = curl_multi_socket_action(multi, CURL_SOCKET_TIMEOUT, 0,
                                          &ev->running_handles);
     }
index 1eb680fb13886cee8f09db17c21b086ca05319a1..36976530f9533a65d00c0025eece9fed56270b95 100644 (file)
@@ -986,8 +986,8 @@ CURLcode Curl_output_aws_sigv4(struct Curl_easy *data)
     goto fail;
 
   result = canon_path(data->state.up.path, strlen(data->state.up.path),
-                        &canonical_path,
-                        should_urlencode(&service));
+                      &canonical_path,
+                      should_urlencode(&service));
   if(result)
     goto fail;
   result = CURLE_OUT_OF_MEMORY;
index b6ecc6a5a18000fa9189e3f58a6bc27cf93727fd..c4032a69e55df81ff69ac7dde146dff89f7c2ee8 100644 (file)
@@ -565,7 +565,7 @@ static CURLcode imap_perform_upgrade_tls(struct Curl_easy *data,
   DEBUGASSERT(!imapc->ssldone);
   result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
   DEBUGF(infof(data, "imap_perform_upgrade_tls, connect -> %d, %d",
-         result, ssldone));
+               result, ssldone));
   if(!result && ssldone) {
     imapc->ssldone = ssldone;
     /* perform CAPA now, changes imapc->state out of IMAP_UPGRADETLS */
@@ -866,6 +866,7 @@ static CURLcode imap_perform_append(struct Curl_easy *data,
   /* Prepare the mime data if some. */
   if(IS_MIME_POST(data)) {
     curl_mimepart *postp = data->set.mimepostp;
+
     /* Use the whole structure as data. */
     postp->flags &= ~(unsigned int)MIME_BODY_ONLY;
 
index 80ccb5888b8da9b293d07d3ecb9196cb02af8327..d78f84282305ae7c46d2efa0083c2e16d6c13567 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -86,14 +86,14 @@ static int MD4_Init(MD4_CTX *ctx)
   return CC_MD4_Init(ctx);
 }
 
-static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
+static void MD4_Update(MD4_CTX *ctx, const void *input, unsigned long len)
 {
-  (void)CC_MD4_Update(ctx, data, (CC_LONG)size);
+  (void)CC_MD4_Update(ctx, input, (CC_LONG)len);
 }
 
-static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
+static void MD4_Final(unsigned char *digest, MD4_CTX *ctx)
 {
-  (void)CC_MD4_Final(result, ctx);
+  (void)CC_MD4_Final(digest, ctx);
 }
 
 #elif defined(USE_WIN32_CRYPTO)
@@ -122,18 +122,18 @@ static int MD4_Init(MD4_CTX *ctx)
   return 1;
 }
 
-static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
+static void MD4_Update(MD4_CTX *ctx, const void *input, unsigned long len)
 {
-  CryptHashData(ctx->hHash, (const BYTE *)data, (unsigned int)size, 0);
+  CryptHashData(ctx->hHash, (const BYTE *)input, (unsigned int)len, 0);
 }
 
-static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
+static void MD4_Final(unsigned char *digest, MD4_CTX *ctx)
 {
   unsigned long length = 0;
 
   CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
   if(length == MD4_DIGEST_LENGTH)
-    CryptGetHashParam(ctx->hHash, HP_HASHVAL, result, &length, 0);
+    CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);
 
   if(ctx->hHash)
     CryptDestroyHash(ctx->hHash);
@@ -152,14 +152,14 @@ static int MD4_Init(MD4_CTX *ctx)
   return 1;
 }
 
-static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
+static void MD4_Update(MD4_CTX *ctx, const void *input, unsigned long len)
 {
-  md4_update(ctx, size, data);
+  md4_update(ctx, len, input);
 }
 
-static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
+static void MD4_Final(unsigned char *digest, MD4_CTX *ctx)
 {
-  md4_digest(ctx, MD4_DIGEST_SIZE, result);
+  md4_digest(ctx, MD4_DIGEST_SIZE, digest);
 }
 
 #else
@@ -240,12 +240,12 @@ typedef struct md4_ctx MD4_CTX;
  * the bit counters. There are no alignment requirements.
  */
 static const void *my_md4_body(MD4_CTX *ctx,
-                               const void *data, unsigned long size)
+                               const void *input, unsigned long size)
 {
   const unsigned char *ptr;
   uint32_t a, b, c, d;
 
-  ptr = (const unsigned char *)data;
+  ptr = (const unsigned char *)input;
 
   a = ctx->a;
   b = ctx->b;
@@ -339,45 +339,46 @@ static int MD4_Init(MD4_CTX *ctx)
 
   ctx->lo = 0;
   ctx->hi = 0;
+
   return 1;
 }
 
-static void MD4_Update(MD4_CTX *ctx, const void *data, unsigned long size)
+static void MD4_Update(MD4_CTX *ctx, const void *input, unsigned long len)
 {
   uint32_t saved_lo;
   unsigned long used;
 
   saved_lo = ctx->lo;
-  ctx->lo = (saved_lo + size) & 0x1fffffff;
+  ctx->lo = (saved_lo + len) & 0x1fffffff;
   if(ctx->lo < saved_lo)
     ctx->hi++;
-  ctx->hi += (uint32_t)size >> 29;
+  ctx->hi += (uint32_t)len >> 29;
 
   used = saved_lo & 0x3f;
 
   if(used) {
     unsigned long available = 64 - used;
 
-    if(size < available) {
-      memcpy(&ctx->buffer[used], data, size);
+    if(len < available) {
+      memcpy(&ctx->buffer[used], input, len);
       return;
     }
 
-    memcpy(&ctx->buffer[used], data, available);
-    data = (const unsigned char *)data + available;
-    size -= available;
+    memcpy(&ctx->buffer[used], input, available);
+    input = (const unsigned char *)input + available;
+    len -= available;
     my_md4_body(ctx, ctx->buffer, 64);
   }
 
-  if(size >= 64) {
-    data = my_md4_body(ctx, data, size & ~(unsigned long)0x3f);
-    size &= 0x3f;
+  if(len >= 64) {
+    input = my_md4_body(ctx, input, len & ~(unsigned long)0x3f);
+    len &= 0x3f;
   }
 
-  memcpy(ctx->buffer, data, size);
+  memcpy(ctx->buffer, input, len);
 }
 
-static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
+static void MD4_Final(unsigned char *digest, MD4_CTX *ctx)
 {
   unsigned long used, available;
 
@@ -408,30 +409,30 @@ static void MD4_Final(unsigned char *result, MD4_CTX *ctx)
 
   my_md4_body(ctx, ctx->buffer, 64);
 
-  result[0] = curlx_ultouc((ctx->a) & 0xff);
-  result[1] = curlx_ultouc((ctx->a >> 8) & 0xff);
-  result[2] = curlx_ultouc((ctx->a >> 16) & 0xff);
-  result[3] = curlx_ultouc(ctx->a >> 24);
-  result[4] = curlx_ultouc((ctx->b) & 0xff);
-  result[5] = curlx_ultouc((ctx->b >> 8) & 0xff);
-  result[6] = curlx_ultouc((ctx->b >> 16) & 0xff);
-  result[7] = curlx_ultouc(ctx->b >> 24);
-  result[8] = curlx_ultouc((ctx->c) & 0xff);
-  result[9] = curlx_ultouc((ctx->c >> 8) & 0xff);
-  result[10] = curlx_ultouc((ctx->c >> 16) & 0xff);
-  result[11] = curlx_ultouc(ctx->c >> 24);
-  result[12] = curlx_ultouc((ctx->d) & 0xff);
-  result[13] = curlx_ultouc((ctx->d >> 8) & 0xff);
-  result[14] = curlx_ultouc((ctx->d >> 16) & 0xff);
-  result[15] = curlx_ultouc(ctx->d >> 24);
+  digest[0] = curlx_ultouc((ctx->a) & 0xff);
+  digest[1] = curlx_ultouc((ctx->a >> 8) & 0xff);
+  digest[2] = curlx_ultouc((ctx->a >> 16) & 0xff);
+  digest[3] = curlx_ultouc(ctx->a >> 24);
+  digest[4] = curlx_ultouc((ctx->b) & 0xff);
+  digest[5] = curlx_ultouc((ctx->b >> 8) & 0xff);
+  digest[6] = curlx_ultouc((ctx->b >> 16) & 0xff);
+  digest[7] = curlx_ultouc(ctx->b >> 24);
+  digest[8] = curlx_ultouc((ctx->c) & 0xff);
+  digest[9] = curlx_ultouc((ctx->c >> 8) & 0xff);
+  digest[10] = curlx_ultouc((ctx->c >> 16) & 0xff);
+  digest[11] = curlx_ultouc(ctx->c >> 24);
+  digest[12] = curlx_ultouc((ctx->d) & 0xff);
+  digest[13] = curlx_ultouc((ctx->d >> 8) & 0xff);
+  digest[14] = curlx_ultouc((ctx->d >> 16) & 0xff);
+  digest[15] = curlx_ultouc(ctx->d >> 24);
 
   memset(ctx, 0, sizeof(*ctx));
 }
 
 #endif /* CRYPTO LIBS */
 
-CURLcode Curl_md4it(unsigned char *output, const unsigned char *input,
-                    const size_t len)
+CURLcode Curl_md4it(unsigned char *output,
+                    const unsigned char *input, const size_t len)
 {
   MD4_CTX ctx;
 
index 96c18f69cb6cf08248a929064b809dd1f0bd5970..e5a4f534c7cf50d0f52497b377077f228124c2df 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -87,10 +87,9 @@ static CURLcode my_md5_init(void *ctx)
 }
 
 static void my_md5_update(void *ctx,
-                          const unsigned char *input,
-                          unsigned int inputLen)
+                          const unsigned char *input, unsigned int len)
 {
-  md5_update(ctx, inputLen, input);
+  md5_update(ctx, len, input);
 }
 
 static void my_md5_final(unsigned char *digest, void *ctx)
@@ -112,8 +111,7 @@ static CURLcode my_md5_init(void *ctx)
 }
 
 static void my_md5_update(void *ctx,
-                          const unsigned char *input,
-                          unsigned int len)
+                          const unsigned char *input, unsigned int len)
 {
   (void)MD5_Update(ctx, input, len);
 }
@@ -136,8 +134,7 @@ static CURLcode my_md5_init(void *ctx)
 }
 
 static void my_md5_update(void *ctx,
-                          const unsigned char *input,
-                          unsigned int len)
+                          const unsigned char *input, unsigned int len)
 {
   (void)wolfSSL_MD5_Update(ctx, input, len);
 }
@@ -160,10 +157,9 @@ static CURLcode my_md5_init(void *ctx)
 }
 
 static void my_md5_update(void *ctx,
-                          const unsigned char *data,
-                          unsigned int length)
+                          const unsigned char *input, unsigned int len)
 {
-  (void)psa_hash_update(ctx, data, length);
+  (void)psa_hash_update(ctx, input, len);
 }
 
 static void my_md5_final(unsigned char *digest, void *ctx)
@@ -191,10 +187,9 @@ static CURLcode my_md5_init(void *ctx)
 }
 
 static void my_md5_update(void *ctx,
-                          const unsigned char *input,
-                          unsigned int inputLen)
+                          const unsigned char *input, unsigned int len)
 {
-  CC_MD5_Update(ctx, input, inputLen);
+  CC_MD5_Update(ctx, input, len);
 }
 
 static void my_md5_final(unsigned char *digest, void *ctx)
@@ -227,11 +222,10 @@ static CURLcode my_md5_init(void *in)
 }
 
 static void my_md5_update(void *in,
-                          const unsigned char *input,
-                          unsigned int inputLen)
+                          const unsigned char *input, unsigned int len)
 {
   my_md5_ctx *ctx = in;
-  CryptHashData(ctx->hHash, (const BYTE *)input, inputLen, 0);
+  CryptHashData(ctx->hHash, (const BYTE *)input, len, 0);
 }
 
 static void my_md5_final(unsigned char *digest, void *in)
@@ -452,44 +446,44 @@ static CURLcode my_md5_init(void *in)
   return CURLE_OK;
 }
 
-static void my_md5_update(void *in, const unsigned char *data,
-                          unsigned int size)
+static void my_md5_update(void *in,
+                          const unsigned char *input, unsigned int len)
 {
   uint32_t saved_lo;
   unsigned int used;
   my_md5_ctx *ctx = (my_md5_ctx *)in;
 
   saved_lo = ctx->lo;
-  ctx->lo = (saved_lo + size) & 0x1fffffff;
+  ctx->lo = (saved_lo + len) & 0x1fffffff;
   if(ctx->lo < saved_lo)
     ctx->hi++;
-  ctx->hi += (uint32_t)size >> 29;
+  ctx->hi += (uint32_t)len >> 29;
 
   used = saved_lo & 0x3f;
 
   if(used) {
     unsigned int available = 64 - used;
 
-    if(size < available) {
-      memcpy(&ctx->buffer[used], data, size);
+    if(len < available) {
+      memcpy(&ctx->buffer[used], input, len);
       return;
     }
 
-    memcpy(&ctx->buffer[used], data, available);
-    data = (const unsigned char *)data + available;
-    size -= available;
+    memcpy(&ctx->buffer[used], input, available);
+    input = (const unsigned char *)input + available;
+    len -= available;
     my_md5_body(ctx, ctx->buffer, 64);
   }
 
-  if(size >= 64) {
-    data = my_md5_body(ctx, data, size & ~(unsigned long)0x3f);
-    size &= 0x3f;
+  if(len >= 64) {
+    input = my_md5_body(ctx, input, len & ~(unsigned long)0x3f);
+    len &= 0x3f;
   }
 
-  memcpy(ctx->buffer, data, size);
+  memcpy(ctx->buffer, input, len);
 }
 
-static void my_md5_final(unsigned char *result, void *in)
+static void my_md5_final(unsigned char *digest, void *in)
 {
   unsigned int used, available;
   my_md5_ctx *ctx = (my_md5_ctx *)in;
@@ -521,22 +515,22 @@ static void my_md5_final(unsigned char *result, void *in)
 
   my_md5_body(ctx, ctx->buffer, 64);
 
-  result[0] = curlx_ultouc((ctx->a) & 0xff);
-  result[1] = curlx_ultouc((ctx->a >> 8) & 0xff);
-  result[2] = curlx_ultouc((ctx->a >> 16) & 0xff);
-  result[3] = curlx_ultouc(ctx->a >> 24);
-  result[4] = curlx_ultouc((ctx->b) & 0xff);
-  result[5] = curlx_ultouc((ctx->b >> 8) & 0xff);
-  result[6] = curlx_ultouc((ctx->b >> 16) & 0xff);
-  result[7] = curlx_ultouc(ctx->b >> 24);
-  result[8] = curlx_ultouc((ctx->c) & 0xff);
-  result[9] = curlx_ultouc((ctx->c >> 8) & 0xff);
-  result[10] = curlx_ultouc((ctx->c >> 16) & 0xff);
-  result[11] = curlx_ultouc(ctx->c >> 24);
-  result[12] = curlx_ultouc((ctx->d) & 0xff);
-  result[13] = curlx_ultouc((ctx->d >> 8) & 0xff);
-  result[14] = curlx_ultouc((ctx->d >> 16) & 0xff);
-  result[15] = curlx_ultouc(ctx->d >> 24);
+  digest[0] = curlx_ultouc((ctx->a) & 0xff);
+  digest[1] = curlx_ultouc((ctx->a >> 8) & 0xff);
+  digest[2] = curlx_ultouc((ctx->a >> 16) & 0xff);
+  digest[3] = curlx_ultouc(ctx->a >> 24);
+  digest[4] = curlx_ultouc((ctx->b) & 0xff);
+  digest[5] = curlx_ultouc((ctx->b >> 8) & 0xff);
+  digest[6] = curlx_ultouc((ctx->b >> 16) & 0xff);
+  digest[7] = curlx_ultouc(ctx->b >> 24);
+  digest[8] = curlx_ultouc((ctx->c) & 0xff);
+  digest[9] = curlx_ultouc((ctx->c >> 8) & 0xff);
+  digest[10] = curlx_ultouc((ctx->c >> 16) & 0xff);
+  digest[11] = curlx_ultouc(ctx->c >> 24);
+  digest[12] = curlx_ultouc((ctx->d) & 0xff);
+  digest[13] = curlx_ultouc((ctx->d >> 8) & 0xff);
+  digest[14] = curlx_ultouc((ctx->d >> 16) & 0xff);
+  digest[15] = curlx_ultouc(ctx->d >> 24);
 
   memset(ctx, 0, sizeof(*ctx));
 }
@@ -564,8 +558,8 @@ const struct MD5_params Curl_DIGEST_MD5 = {
  * @unittest: 1601
  * Returns CURLE_OK on success.
  */
-CURLcode Curl_md5it(unsigned char *outbuffer, const unsigned char *input,
-                    const size_t len)
+CURLcode Curl_md5it(unsigned char *output,
+                    const unsigned char *input, const size_t len)
 {
   CURLcode result;
   my_md5_ctx ctx;
@@ -573,7 +567,7 @@ CURLcode Curl_md5it(unsigned char *outbuffer, const unsigned char *input,
   result = my_md5_init(&ctx);
   if(!result) {
     my_md5_update(&ctx, input, curlx_uztoui(len));
-    my_md5_final(outbuffer, &ctx);
+    my_md5_final(output, &ctx);
   }
   return result;
 }
@@ -607,10 +601,9 @@ struct MD5_context *Curl_MD5_init(const struct MD5_params *md5params)
 }
 
 CURLcode Curl_MD5_update(struct MD5_context *context,
-                         const unsigned char *data,
-                         unsigned int len)
+                         const unsigned char *input, unsigned int len)
 {
-  (*context->md5_hash->md5_update_func)(context->md5_hashctx, data, len);
+  (*context->md5_hash->md5_update_func)(context->md5_hashctx, input, len);
 
   return CURLE_OK;
 }
index 857cf26c6b912c8e1c9cbf307e354876382a2682..55d970c4f1f1722466849a462dd5b9827011c3f4 100644 (file)
@@ -495,7 +495,7 @@ static CURLcode pop3_perform_upgrade_tls(struct Curl_easy *data,
   DEBUGASSERT(!pop3c->ssldone);
   result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
   DEBUGF(infof(data, "pop3_perform_upgrade_tls, connect -> %d, %d",
-         result, ssldone));
+               result, ssldone));
   if(!result && ssldone) {
     pop3c->ssldone = ssldone;
     /* perform CAPA now, changes pop3c->state out of POP3_UPGRADETLS */
index ad7f628f1ac3da921e11b680f77cdd5184174ef3..aed9c7eb3b1608262ff4c4670df52bb919b1672b 100644 (file)
@@ -292,7 +292,7 @@ static CURLcode req_flush(struct Curl_easy *data)
       return result;
     if(!Curl_bufq_is_empty(&data->req.sendbuf)) {
       DEBUGF(infof(data, "Curl_req_flush(len=%zu) -> EAGAIN",
-             Curl_bufq_len(&data->req.sendbuf)));
+                   Curl_bufq_len(&data->req.sendbuf)));
       return CURLE_AGAIN;
     }
   }
index 3ac8c6d5128a01648af38015dbe1d13fac0b3076..caf2f8942e0b432bd72fccbbc90277c69559b387 100644 (file)
@@ -71,7 +71,6 @@
  * just as under Linux (e.g. <sys/socket.h>) and the Winsock headers should
  * never be included when __CYGWIN__ is defined.
  */
-
 #ifdef _WIN32
 #  if defined(UNICODE) && !defined(_UNICODE)
 #    error "UNICODE is defined but _UNICODE is not defined"
@@ -89,7 +88,6 @@
  * those symbols to compare against, and even those that do may be missing
  * newer symbols.
  */
-
 #ifndef _WIN32_WINNT_VISTA
 #define _WIN32_WINNT_VISTA          0x0600   /* Windows Vista */
 #endif
index cd585d131d40c0b3ce9149e109d6ba31f60165b7..cb502dee825995ab70fc1b457e4894b482a4d191 100644 (file)
@@ -433,7 +433,7 @@ static CURLcode cr_eob_read(struct Curl_easy *data,
   }
   *peos = (bool)ctx->eos;
   DEBUGF(infof(data, "cr_eob_read(%zu) -> %d, %zd, %d",
-         blen, result, *pnread, *peos));
+               blen, result, *pnread, *peos));
   return result;
 }
 
@@ -700,7 +700,7 @@ static CURLcode smtp_perform_upgrade_tls(struct Curl_easy *data,
   DEBUGASSERT(!smtpc->ssldone);
   result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone);
   DEBUGF(infof(data, "smtp_perform_upgrade_tls, connect -> %d, %d",
-           result, ssldone));
+               result, ssldone));
   if(!result && ssldone) {
     smtpc->ssldone = ssldone;
     /* perform EHLO now, changes smtp->state out of SMTP_UPGRADETLS */
@@ -849,9 +849,10 @@ static CURLcode smtp_perform_command(struct Curl_easy *data,
 
       /* Establish whether we should report SMTPUTF8 to the server for this
          mailbox as per RFC-6531 sect. 3.1 point 6 */
-      utf8 = (smtpc->utf8_supported) &&
-             ((host.encalloc) || (!Curl_is_ASCII_name(address)) ||
-              (!Curl_is_ASCII_name(host.name)));
+      utf8 = smtpc->utf8_supported &&
+             (host.encalloc ||
+              !Curl_is_ASCII_name(address) ||
+              !Curl_is_ASCII_name(host.name));
 
       /* Send the VRFY command (Note: The hostname part may be absent when the
          host is a local system) */
@@ -924,9 +925,10 @@ static CURLcode smtp_perform_mail(struct Curl_easy *data,
 
     /* Establish whether we should report SMTPUTF8 to the server for this
        mailbox as per RFC-6531 sect. 3.1 point 4 and sect. 3.4 */
-    utf8 = (smtpc->utf8_supported) &&
-           ((host.encalloc) || (!Curl_is_ASCII_name(address)) ||
-            (!Curl_is_ASCII_name(host.name)));
+    utf8 = smtpc->utf8_supported &&
+           (host.encalloc ||
+            !Curl_is_ASCII_name(address) ||
+            !Curl_is_ASCII_name(host.name));
 
     if(host.name) {
       from = curl_maprintf("<%s@%s>%s", address, host.name, suffix);
@@ -965,9 +967,10 @@ static CURLcode smtp_perform_mail(struct Curl_easy *data,
 
       /* Establish whether we should report SMTPUTF8 to the server for this
          mailbox as per RFC-6531 sect. 3.1 point 4 and sect. 3.4 */
-      if((!utf8) && (smtpc->utf8_supported) &&
-         ((host.encalloc) || (!Curl_is_ASCII_name(address)) ||
-          (!Curl_is_ASCII_name(host.name))))
+      if(!utf8 && smtpc->utf8_supported &&
+         (host.encalloc ||
+          !Curl_is_ASCII_name(address) ||
+          !Curl_is_ASCII_name(host.name)))
         utf8 = TRUE;
 
       if(host.name) {
index ce86d22f5264eda895ad09c55aa69de8e5aab31d..e25fe94a2aa4f7adff595563a2d8ded7eb10665e 100644 (file)
@@ -254,8 +254,9 @@ static CURLcode sendrecv_dl(struct Curl_easy *data,
     if(bytestoread && Curl_rlimit_active(&data->progress.dl.rlimit)) {
       curl_off_t dl_avail = Curl_rlimit_avail(&data->progress.dl.rlimit,
                                               Curl_pgrs_now(data));
-      /* DEBUGF(infof(data, "dl_rlimit, available=%" FMT_OFF_T, dl_avail));
-       */
+#if 0
+      DEBUGF(infof(data, "dl_rlimit, available=%" FMT_OFF_T, dl_avail));
+#endif
       /* In case of rate limited downloads: if this loop already got
        * data and less than 16k is left in the limit, break out.
        * We want to stutter a bit to keep in the limit, but too small
@@ -278,7 +279,7 @@ static CURLcode sendrecv_dl(struct Curl_easy *data,
       if(data->req.download_done && data->req.no_body &&
          !data->req.resp_trailer) {
         DEBUGF(infof(data, "EAGAIN, download done, no trailer announced, "
-               "not waiting for EOS"));
+                     "not waiting for EOS"));
         blen = 0;
         /* continue as if we received the EOS */
       }
index 40a3f2ce661265164c895c6a21c4c770be65c28f..21fe1d1acb2c7675c6cb20feb6cb3e32c0065aba 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -752,8 +752,8 @@ static bool ssh_config_matches(struct connectdata *one,
 
   sshc1 = Curl_conn_meta_get(one, CURL_META_SSH_CONN);
   sshc2 = Curl_conn_meta_get(two, CURL_META_SSH_CONN);
-  return (sshc1 && sshc2 && Curl_safecmp(sshc1->rsa, sshc2->rsa) &&
-          Curl_safecmp(sshc1->rsa_pub, sshc2->rsa_pub));
+  return sshc1 && sshc2 && Curl_safecmp(sshc1->rsa, sshc2->rsa) &&
+         Curl_safecmp(sshc1->rsa_pub, sshc2->rsa_pub);
 }
 #endif
 
@@ -990,21 +990,21 @@ static bool url_match_http_version(struct connectdata *conn,
     case 30:
       if(!(m->data->state.http_neg.allowed & CURL_HTTP_V3x)) {
         DEBUGF(infof(m->data, "not reusing conn #%" CURL_FORMAT_CURL_OFF_T
-               ", we do not want h3", conn->connection_id));
+                     ", we do not want h3", conn->connection_id));
         return FALSE;
       }
       break;
     case 20:
       if(!(m->data->state.http_neg.allowed & CURL_HTTP_V2x)) {
         DEBUGF(infof(m->data, "not reusing conn #%" CURL_FORMAT_CURL_OFF_T
-               ", we do not want h2", conn->connection_id));
+                     ", we do not want h2", conn->connection_id));
         return FALSE;
       }
       break;
     default:
       if(!(m->data->state.http_neg.allowed & CURL_HTTP_V1x)) {
         DEBUGF(infof(m->data, "not reusing conn #%" CURL_FORMAT_CURL_OFF_T
-               ", we do not want h1", conn->connection_id));
+                     ", we do not want h1", conn->connection_id));
         return FALSE;
       }
       break;
@@ -1081,9 +1081,9 @@ static bool url_match_destination(struct connectdata *conn,
       }
       /* We are in an IMAPS vs IMAP like case. We expect `conn` to have SSL */
       if(!Curl_conn_is_ssl(conn, FIRSTSOCKET)) {
-        DEBUGF(infof(m->data,
-          "Connection #%" FMT_OFF_T " has compatible protocol family, "
-          "but no SSL, no match", conn->connection_id));
+        DEBUGF(infof(m->data, "Connection #%" FMT_OFF_T
+                     " has compatible protocol family, but no SSL, no match",
+                     conn->connection_id));
         return FALSE;
       }
     }
@@ -1109,8 +1109,7 @@ static bool url_match_ssl_config(struct connectdata *conn,
   /* If talking TLS, conn needs to use the same SSL options. */
   if((m->needle->scheme->flags & PROTOPT_SSL) &&
      !Curl_ssl_conn_config_match(m->data, conn, FALSE)) {
-    DEBUGF(infof(m->data,
-                 "Connection #%" FMT_OFF_T
+    DEBUGF(infof(m->data, "Connection #%" FMT_OFF_T
                  " has different SSL parameters, cannot reuse",
                  conn->connection_id));
     return FALSE;
index 106776a2a4eb5d10afbf17ce7ee71196d598512b..65c78e68485b63468465175893f00cc8eff04c1b 100644 (file)
@@ -1607,7 +1607,6 @@ static CURLcode h3_stream_open(struct Curl_cfilter *cf,
                                   0, pnwritten);
   if(result)
     goto out;
-
   if(!stream->h1.done) {
     /* need more data */
     goto out;
index e289548598c54fa0fb024b5465130ef29b017713..ed9163f20ec0bbff20fd684b82b8da75a47e8bc0 100644 (file)
@@ -51,7 +51,7 @@
 #include "../vtls/vtls.h"
 
 /* HTTP/3 error values defined in RFC 9114, ch. 8.1 */
-#define CURL_H3_NO_ERROR  (0x0100)
+#define CURL_H3_NO_ERROR  0x0100
 
 #define QUIC_MAX_STREAMS              (100)
 
index 26ca953c3684914c4f76621aa5d114b158fb628a..3a4671b6fac5363b59c88c04beaa14d36ea02761 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
      |N|V|V|V|       |
      | |1|2|3|       |
 */
-#define WSBIT_FIN          (0x80)
-#define WSBIT_RSV1         (0x40)
-#define WSBIT_RSV2         (0x20)
-#define WSBIT_RSV3         (0x10)
+#define WSBIT_FIN          0x80
+#define WSBIT_RSV1         0x40
+#define WSBIT_RSV2         0x20
+#define WSBIT_RSV3         0x10
 #define WSBIT_RSV_MASK     (WSBIT_RSV1 | WSBIT_RSV2 | WSBIT_RSV3)
-#define WSBIT_OPCODE_CONT  (0x0)
-#define WSBIT_OPCODE_TEXT  (0x1)
-#define WSBIT_OPCODE_BIN   (0x2)
-#define WSBIT_OPCODE_CLOSE (0x8)
-#define WSBIT_OPCODE_PING  (0x9)
-#define WSBIT_OPCODE_PONG  (0xa)
-#define WSBIT_OPCODE_MASK  (0xf)
+#define WSBIT_OPCODE_CONT  0x0
+#define WSBIT_OPCODE_TEXT  0x1
+#define WSBIT_OPCODE_BIN   0x2
+#define WSBIT_OPCODE_CLOSE 0x8
+#define WSBIT_OPCODE_PING  0x9
+#define WSBIT_OPCODE_PONG  0xa
+#define WSBIT_OPCODE_MASK  0xf
 
 #define WSBIT_MASK 0x80
 
@@ -387,7 +387,9 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec,
       }
 
       dec->head_len = 1;
-      /* ws_dec_info(dec, data, "seeing opcode"); */
+#if 0
+      ws_dec_info(dec, data, "seeing opcode");
+#endif
       continue;
     }
     else if(dec->head_len == 1) {
@@ -439,7 +441,9 @@ static CURLcode ws_dec_read_head(struct ws_decoder *dec,
       Curl_bufq_skip(inraw, 1);
       ++dec->head_len;
       if(dec->head_len < dec->head_total) {
-        /* ws_dec_info(dec, data, "decoding head"); */
+#if 0
+        ws_dec_info(dec, data, "decoding head");
+#endif
         continue;
       }
     }
index 7966a38f820bba7dafe01304e6f75084a1e45968..426d69066ed04374dea999012b2a859920fd2241 100644 (file)
@@ -277,7 +277,9 @@ static void set_features(void)
   /* Commented here to prevent future bugs: A program or user should */
   /* never ever enable DECC$POSIX_STYLE_UID. */
   /* It will probably break all code that accesses UIDs */
-  /*  do_not_set_default("DECC$POSIX_STYLE_UID", TRUE); */
+#if 0
+  do_not_set_default("DECC$POSIX_STYLE_UID", TRUE);
+#endif
 }
 
 /* Some boilerplate to force this to be a proper LIB$INITIALIZE section */
@@ -288,22 +290,22 @@ static void set_features(void)
 #pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long, nopic
 #else
 #pragma extern_model strict_refdef "LIB$INITIALIZE" nowrt, long
-#    if __INITIAL_POINTER_SIZE
-#        pragma __pointer_size __save
-#        pragma __pointer_size 32
-#    else
-#        pragma __required_pointer_size __save
-#        pragma __required_pointer_size 32
-#    endif
+#  if __INITIAL_POINTER_SIZE
+#    pragma __pointer_size __save
+#    pragma __pointer_size 32
+#  else
+#    pragma __required_pointer_size __save
+#    pragma __required_pointer_size 32
+#  endif
 #endif
 /* Set our contribution to the LIB$INITIALIZE array */
 void (* const iniarray[])(void) = { set_features };
 #ifndef __VAX
-#    if __INITIAL_POINTER_SIZE
-#        pragma __pointer_size __restore
-#    else
-#        pragma __required_pointer_size __restore
-#    endif
+#  if __INITIAL_POINTER_SIZE
+#    pragma __pointer_size __restore
+#  else
+#    pragma __required_pointer_size __restore
+#  endif
 #endif
 
 /*
index fe945cfa9c7be02a800f08d6936351e429d97863..d0e7d1d64c1453febefd96cee590f4b39252cdad 100644 (file)
@@ -39,7 +39,6 @@
  * get_terminal_columns() returns the number of columns in the current
  * terminal. It will return 79 on failure. Also, the number can be big.
  */
-
 unsigned int get_terminal_columns(void)
 {
   unsigned int width = 0;
index eb73f23a4128d800456b6576f6ee624fa971cace..f18b539b29c2618d00a496f7e2a471850cca1ac7 100644 (file)
@@ -46,7 +46,7 @@
 #  ifdef S_IFCHR
 #    define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
 #  else
-#    define S_ISCHR(m) (0) /* cannot tell if file is a device */
+#    define S_ISCHR(m) 0 /* cannot tell if file is a device */
 #  endif
 #endif
 
index 47fe955615783cd693b862841007520763a4c36e..1acb175bf47dca27c470b0426dbfd1b3fe582dc0 100644 (file)
@@ -2880,7 +2880,7 @@ static ParameterError opt_string(struct OperationConfig *config,
 /* detect e2 80 80 - e2 80 ff */
 static bool has_leading_unicode(const unsigned char *arg)
 {
-  return ((arg[0] == 0xe2) && (arg[1] == 0x80) && (arg[2] & 0x80));
+  return (arg[0] == 0xe2) && (arg[1] == 0x80) && (arg[2] & 0x80);
 }
 
 /* the longest command line option, excluding the leading -- */
@@ -3081,7 +3081,7 @@ ParameterError parse_args(int argc, argv_item_t argv[])
         }
 
         err = getparameter(orig_opt, nextarg, &passarg, config,
-                              CONFIG_MAX_LEVELS);
+                           CONFIG_MAX_LEVELS);
 
         unicodefree(CURL_UNCONST(nextarg));
         config = global->last;
index 25bff3152f7c3b896d0ad76f2da4230b20b10ee1..3d2d5dea8424432dfe85fb138e171135c563643c 100644 (file)
@@ -33,7 +33,7 @@
 static bool has_trailing_slash(const char *input)
 {
   size_t len = strlen(input);
-  return (len && input[len - 1] == '/');
+  return len && input[len - 1] == '/';
 }
 
 static char *ipfs_gateway(void)
index 035f6b63183da0d65679dc6987a5d208a673aab3..e0cbe20c461541a9336755146e66539779d1ef6c 100644 (file)
@@ -53,7 +53,7 @@ bool output_expected(const char *url, const char *uploadfile)
   if(!uploadfile)
     return TRUE;  /* download */
   if(checkprefix("http://", url) || checkprefix("https://", url))
-    return TRUE;   /* HTTP(S) upload */
+    return TRUE;  /* HTTP(S) upload */
 
   return FALSE; /* non-HTTP upload, probably no output should be expected */
 }
index c81a9999796f5c1a24a0a516d7a7d50f16bfcd2f..2ffcd1076b978b354dfd80d972f70973d9746daa 100644 (file)
@@ -342,7 +342,7 @@ CURLcode tool_setopt_bitmask(CURL *curl, const char *name, CURLoption tag,
         /* all value flags contained in rest */
         rest &= ~nv->value;    /* remove bits handled here */
         result = easysrc_addf(&easysrc_code, "%s(long)%s%s",
-                           preamble, nv->name, rest ? " |" : ");");
+                              preamble, nv->name, rest ? " |" : ");");
         if(!rest || result)
           break;                /* handled them all */
         /* replace with all spaces for continuation line */
@@ -707,6 +707,7 @@ CURLcode tool_setopt_str(CURL *curl, struct OperationConfig *config,
 /* return TRUE if the error code is "lethal" */
 bool setopt_bad(CURLcode result)
 {
-  return (result && (result != CURLE_NOT_BUILT_IN) &&
-          (result != CURLE_UNKNOWN_OPTION));
+  return result &&
+         (result != CURLE_NOT_BUILT_IN) &&
+         (result != CURLE_UNKNOWN_OPTION);
 }
index ba1059659ae8f7a1ed0caeb473ed02b11b30bb5f..8a482460fa9f798d80b0ba0869b43c421a43d037 100644 (file)
@@ -455,7 +455,7 @@ static CURLcode glob_parse(struct URLGlob *glob, const char *pattern,
     if(curlx_dyn_len(&glob->buf)) {
       /* we got a literal string, add it as a single-item list */
       result = glob_fixed(glob, curlx_dyn_ptr(&glob->buf),
-                       curlx_dyn_len(&glob->buf));
+                          curlx_dyn_len(&glob->buf));
       if(!result)
         result = add_glob(glob, pos);
       curlx_dyn_reset(&glob->buf);
index 3519628fc121a4ca31feddd36147a143526ff850..89ea31ee1583277ab18498d5fa8ea3f634106c05 100644 (file)
@@ -38,7 +38,7 @@ int is_vms_shell(void);
 void vms_special_exit(int code, int vms_show);
 
 #undef exit
-#define exit(__code) vms_special_exit((__code), (0))
+#define exit(__code) vms_special_exit(__code, 0)
 
 #define VMS_STS(c, f, e, s)                                                \
   (((c & 0xF) << 28) | ((f & 0xFFF) << 16) | ((e & 0x1FFF) < 3) | (s & 7))
index 51e0d46715379c2513010cc1e1ae646533f1101d..500242a7ebd77d718d883d91b3107d05bddf5b78 100644 (file)
@@ -404,7 +404,9 @@ static CURLcode test_cli_hx_download(const char *URL)
   curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_COOKIE);
   curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_DNS);
   curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);
-  /* curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT); */
+#if 0
+  curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_CONNECT);
+#endif
   curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_PSL);
   curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_HSTS);
 
index 655b85785f3aa51afc55fc6d6fd60d76c03c7b85..64ae2898d5ace7c4d07f77160c6aa7f2d0896ad1 100644 (file)
@@ -65,7 +65,9 @@ static int progress_callback(void *clientp,
   {
     CURL *curl = (CURL *)clientp;
     curl_easy_pause(curl, CURLPAUSE_CONT);
-    /* curl_easy_pause(curl, CURLPAUSE_RECV_CONT); */
+#if 0
+    curl_easy_pause(curl, CURLPAUSE_RECV_CONT);
+#endif
   }
 #endif
   return 0;
index 76b61206a5f1c5088dda08b2c3d77565cf0013ed..1099c3c956f3e38f1a37d1e1dc40ff42d3363cdf 100644 (file)
@@ -43,10 +43,10 @@ static size_t WriteHeader(char *ptr, size_t size, size_t nmemb, void *stream)
 
 static CURLcode test_lib1509(const char *URL)
 {
-  long headerSize;
-  CURLcode code;
   CURL *curl = NULL;
+  CURLcode code;
   CURLcode result = CURLE_OK;
+  long headerSize;
 
   global_init(CURL_GLOBAL_ALL);
 
index 7abc2ba1391be3fef6682dda07557cc13afef60b..57b0a0d5a5b93da7c9aa44ab7a17a2964a2878d0 100644 (file)
@@ -95,8 +95,10 @@ static CURLcode test_lib1517(const char *URL)
   /* include headers in the output */
   test_setopt(curl, CURLOPT_HEADER, 1L);
 
+#if 0
   /* detect HTTP error codes >= 400 */
-  /* test_setopt(curl, CURLOPT_FAILONERROR, 1L); */
+  test_setopt(curl, CURLOPT_FAILONERROR, 1L);
+#endif
 
   /* Perform the request, result will get the return code */
   result = curl_easy_perform(curl);
index f6226bcf6026561831d9be846d2faf76b3457b06..a46ba8af03b7815f8803e9f7a1798be9de2485c4 100644 (file)
@@ -42,8 +42,8 @@ static size_t header(char *ptr, size_t size, size_t nmemb, void *stream)
 
 static CURLcode test_lib1556(const char *URL)
 {
-  CURLcode code;
   CURL *curl = NULL;
+  CURLcode code;
   CURLcode result = CURLE_OK;
   struct headerinfo info = { 0 };
 
index d405c6dfa058d576bc787a6eec2a93936448e2e7..3a0b3b9537fd7b68a4f0376deeeecfbfa071ce02 100644 (file)
@@ -29,7 +29,7 @@
 #error "this test requires FD_SETSIZE"
 #endif
 
-#define T518_SAFETY_MARGIN (16)
+#define T518_SAFETY_MARGIN 16
 
 #define NUM_OPEN   (FD_SETSIZE + 10)
 #define NUM_NEEDED (NUM_OPEN + T518_SAFETY_MARGIN)
index 1bf6fcba067802b0d2b36a3a6d2744774a7fb5f8..23e0e5c3e9af2835c58051f06f0bb6c4fecbf1ea 100644 (file)
@@ -29,7 +29,7 @@
 #error "this test requires FD_SETSIZE"
 #endif
 
-#define T537_SAFETY_MARGIN (11)
+#define T537_SAFETY_MARGIN 11
 
 #if defined(_WIN32) || defined(MSDOS)
 #define DEV_NULL "NUL"
index 073aabf4e9d66d17ed1d6427b353dfdea0517ee2..a5e479d37552ffaf76b893e52a6ec91d6fd14f1d 100644 (file)
@@ -69,14 +69,18 @@ static size_t rtp_write(char *data, size_t size, size_t nmemb, void *stream)
     if(message_size - i > RTP_DATA_SIZE) {
       if(memcmp(RTP_DATA, data + i, RTP_DATA_SIZE) != 0) {
         curl_mprintf("RTP PAYLOAD CORRUPTED [%s]\n", data + i);
-        /* return failure; */
+#if 0
+        return failure;
+#endif
       }
     }
     else {
       if(memcmp(RTP_DATA, data + i, message_size - i) != 0) {
         curl_mprintf("RTP PAYLOAD END CORRUPTED (%d), [%s]\n",
                      message_size - i, data + i);
-        /* return failure; */
+#if 0
+        return failure;
+#endif
       }
     }
   }
index 949c9c12b3161314f5706410c77ab40cbbd9a9f8..cd402191e11f56f58c1aa1827d45fb5a6b538a86 100644 (file)
@@ -632,7 +632,9 @@ static int test_dnsd(int argc, char **argv)
       clear_advisor_read_lock(loglockfile);
     }
 
-    /* logmsg("end of one transfer"); */
+#if 0
+    logmsg("end of one transfer");
+#endif
   }
 
 dnsd_cleanup: