]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
lib: cleanup for some typos about spaces and code style
authorx2018 <xkernel.wang@foxmail.com>
Wed, 5 Nov 2025 07:28:56 +0000 (15:28 +0800)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 5 Nov 2025 13:07:28 +0000 (14:07 +0100)
Closes #19370

53 files changed:
lib/asyn-base.c
lib/asyn-thrdd.c
lib/cf-h1-proxy.c
lib/cf-h2-proxy.c
lib/cf-ip-happy.c
lib/conncache.c
lib/curl_addrinfo.c
lib/curl_fnmatch.c
lib/curl_gssapi.c
lib/curl_ntlm_core.c
lib/curl_sasl.c
lib/curl_sha512_256.c
lib/cw-out.c
lib/doh.c
lib/escape.c
lib/formdata.c
lib/ftp.c
lib/http.c
lib/http1.c
lib/http2.c
lib/http_aws_sigv4.c
lib/httpsrr.c
lib/mime.c
lib/multi.c
lib/openldap.c
lib/parsedate.c
lib/pingpong.c
lib/request.c
lib/setopt.c
lib/smtp.c
lib/socks.c
lib/socks_gssapi.c
lib/socks_sspi.c
lib/tftp.c
lib/url.c
lib/vauth/spnego_sspi.c
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_osslq.c
lib/vquic/curl_quiche.c
lib/vquic/vquic.c
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vtls/gtls.c
lib/vtls/mbedtls.c
lib/vtls/rustls.c
lib/vtls/schannel.c
lib/vtls/vtls.c
lib/vtls/wolfssl.c
lib/vtls/x509asn1.c
lib/ws.c
packages/vms/curl_crtl_init.c
src/tool_operate.c
src/tool_progress.c

index eb2240b816c9a775e6e83d3a05c0ea3448a815c2..a49e1752a57a3c5e0eb6729435f63a2ecb261287 100644 (file)
@@ -77,8 +77,6 @@
  *
  * Returns: sockets-in-use-bitmap
  */
-
-
 CURLcode Curl_ares_pollset(struct Curl_easy *data,
                            ares_channel channel,
                            struct easy_pollset *ps)
index da83cca87a76c98c6bf906996bf41e4f525ffbd7..b25745ee1b3b44395e05c225529aedaedbec49da 100644 (file)
@@ -666,7 +666,7 @@ CURLcode Curl_async_is_resolved(struct Curl_easy *data,
       /* Start at 1ms poll interval */
       thrdd->addr->poll_interval = 1;
     else if(elapsed >= thrdd->addr->interval_end)
-      /* Back-off exponentially if last interval expired  */
+      /* Back-off exponentially if last interval expired */
       thrdd->addr->poll_interval *= 2;
 
     if(thrdd->addr->poll_interval > 250)
index e65aa74ddb87cebb689483c1c0f306eca46249c4..f46cc09616b61bdd05c6b38d5542c4ce50226ae8 100644 (file)
@@ -126,7 +126,7 @@ static CURLcode tunnel_init(struct Curl_cfilter *cf,
   curlx_dyn_init(&ts->request_data, DYN_HTTP_REQUEST);
   Curl_httpchunk_init(data, &ts->ch, TRUE);
 
-  *pts =  ts;
+  *pts = ts;
   connkeep(cf->conn, "HTTP proxy CONNECT");
   return tunnel_reinit(cf, data, ts);
 }
@@ -350,7 +350,7 @@ static CURLcode on_resp_header(struct Curl_cfilter *cf,
           ISDIGIT(header[9]) && ISDIGIT(header[10]) && ISDIGIT(header[11]) &&
           !ISDIGIT(header[12])) {
     /* store the HTTP code from the proxy */
-    data->info.httpproxycode =  k->httpcode = (header[9] - '0') * 100 +
+    data->info.httpproxycode = k->httpcode = (header[9] - '0') * 100 +
       (header[10] - '0') * 10 + (header[11] - '0');
   }
   return result;
index 8baa227aac22d1259b86e9d6f4df5ad072f62f8b..f9bd827374fa33c2ceb53a96e2af7075ca7c4fe3 100644 (file)
@@ -365,7 +365,6 @@ static CURLcode cf_h2_proxy_ctx_init(struct Curl_cfilter *cf,
     goto out;
   }
 
-
   /* all set, traffic will be send on connect */
   result = CURLE_OK;
 
@@ -468,8 +467,8 @@ static CURLcode proxy_h2_progress_ingress(struct Curl_cfilter *cf,
 
   /* Receive data from the "lower" filters, e.g. network until
    * it is time to stop or we have enough data for this stream */
-  while(!ctx->conn_closed &&               /* not closed the connection */
-        !ctx->tunnel.closed &&             /* nor the tunnel */
+  while(!ctx->conn_closed &&                /* not closed the connection */
+        !ctx->tunnel.closed &&              /* nor the tunnel */
         Curl_bufq_is_empty(&ctx->inbufq) && /* and we consumed our input */
         !Curl_bufq_is_full(&ctx->tunnel.recvbuf)) {
 
index 6b7130be83f5fb439f6d38033dec4f08c5475b24..22ae260ce04730be5455da91663c153abe73c35d 100644 (file)
@@ -237,7 +237,7 @@ static CURLcode cf_ip_attempt_connect(struct cf_ip_attempt *a,
                                       bool *connected)
 {
   *connected = a->connected;
-  if(!a->result &&  !*connected) {
+  if(!a->result && !*connected) {
     /* evaluate again */
     a->result = Curl_conn_cf_connect(a->cf, data, connected);
 
index 5c4bc357cc7a7fa2f5bb5d2b0ebb6a3a99215479..d5770ef9164c282f6b4c92b92f3025caf058d907 100644 (file)
@@ -375,7 +375,7 @@ int Curl_cpool_check_limits(struct Curl_easy *data,
     bundle = cpool_find_bundle(cpool, conn);
     live = bundle ? Curl_llist_count(&bundle->conns) : 0;
     shutdowns = Curl_cshutdn_dest_count(data, conn->destination);
-    while((live  + shutdowns) >= dest_limit) {
+    while((live + shutdowns) >= dest_limit) {
       if(shutdowns) {
         /* close one connection in shutdown right away, if we can */
         if(!Curl_cshutdn_close_oldest(data, conn->destination))
index e26ee656bda4d3b1a13f1ce936b41e02126623e2..fc26bef8333d0b4366637a110518a439f5bd59da 100644 (file)
@@ -68,7 +68,7 @@
  */
 
 #if defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 910) && \
-  defined(__OPTIMIZE__) && defined(__unix__) &&  defined(__i386__)
+  defined(__OPTIMIZE__) && defined(__unix__) && defined(__i386__)
   /* workaround icc 9.1 optimizer issue */
 # define vqualifier volatile
 #else
index 66b9739f3c035c6f8da97f4c3f28ffbceb2595d2..3148c472e299f118a74234976f58046f2a20306e 100644 (file)
@@ -243,7 +243,7 @@ static int setcharset(const unsigned char **p, unsigned char *charset)
     case CURLFNM_SCHS_RIGHTBRLEFTBR:
       if(c == ']')
         return SETCHARSET_OK;
-      state  = CURLFNM_SCHS_DEFAULT;
+      state = CURLFNM_SCHS_DEFAULT;
       charset[c] = 1;
       (*p)++;
       break;
index 74128559c17268168b8591664fbbb84359b36510..947bb9c006315da0bee4a9a44cf8c0949201df1d 100644 (file)
@@ -392,7 +392,8 @@ OM_uint32 Curl_gss_delete_sec_context(OM_uint32 *min,
 
 #define GSS_LOG_BUFFER_LEN 1024
 static size_t display_gss_error(OM_uint32 status, int type,
-                                char *buf, size_t len) {
+                                char *buf, size_t len)
+{
   OM_uint32 maj_stat;
   OM_uint32 min_stat;
   OM_uint32 msg_ctx = 0;
index 9c5e8047795bc0632b9cf1882cdd8357be9fe5aa..28ae16d187a51e31beed48a15441773a52734799 100644 (file)
@@ -650,10 +650,10 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(unsigned char *ntlmv2hash,
  *
  * Returns CURLE_OK on success.
  */
-CURLcode  Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
-                                      unsigned char *challenge_client,
-                                      unsigned char *challenge_server,
-                                      unsigned char *lmresp)
+CURLcode Curl_ntlm_core_mk_lmv2_resp(unsigned char *ntlmv2hash,
+                                     unsigned char *challenge_client,
+                                     unsigned char *challenge_server,
+                                     unsigned char *lmresp)
 {
   unsigned char data[16];
   unsigned char hmac_output[16];
index 043786f73fa1abfe22bffd74787ad2c779e6dbc6..b04e9582689d7622f76eadcc87f44f54f0129a96 100644 (file)
@@ -932,10 +932,10 @@ CURLcode Curl_sasl_is_blocked(struct SASL *sasl, struct Curl_easy *data)
                   CURL_SASL_DIGEST, TRUE, NULL);
     sasl_unchosen(data, SASL_MECH_NTLM, enabledmechs,
                   CURL_SASL_NTLM, Curl_auth_is_ntlm_supported(), NULL);
-    sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs,  TRUE, TRUE,
+    sasl_unchosen(data, SASL_MECH_OAUTHBEARER, enabledmechs, TRUE, TRUE,
                   data->set.str[STRING_BEARER] ?
                   NULL : "CURLOPT_XOAUTH2_BEARER");
-    sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs,  TRUE, TRUE,
+    sasl_unchosen(data, SASL_MECH_XOAUTH2, enabledmechs, TRUE, TRUE,
                   data->set.str[STRING_BEARER] ?
                   NULL : "CURLOPT_XOAUTH2_BEARER");
   }
index 7e9b223387e0631de6e330aa128bc5c809c2a155..0d2cd3c3f966a4639d76f401ab704ddd41828439 100644 (file)
@@ -344,7 +344,7 @@ static CURL_FORCEINLINE curl_uint64_t Curl_rotr64(curl_uint64_t value,
  * Size of the SHA-512/256 resulting digest in words.
  * This is the final digest size, not intermediate hash.
  */
-#define SHA512_256_DIGEST_SIZE_WORDS (SHA512_256_HASH_SIZE_WORDS  / 2)
+#define SHA512_256_DIGEST_SIZE_WORDS (SHA512_256_HASH_SIZE_WORDS / 2)
 
 /**
  * Size of the SHA-512/256 resulting digest in bytes
@@ -760,7 +760,6 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
 
 #endif /* Local SHA-512/256 code */
 
-
 /**
  * Compute SHA-512/256 hash for the given data in one function call
  * @param[out] output the pointer to put the hash
index 9c0a36e7e5e2850cdac6dccd829a2299f31110ba..36cfc36aca047e26acc527f28986d9f1e145fd77 100644 (file)
@@ -252,7 +252,7 @@ static CURLcode cw_out_ptr_flush(struct cw_out_ctx *ctx,
   size_t wlen, nwritten;
   CURLcode result;
 
-  /* If we errored once, we do not invoke the client callback  again */
+  /* If we errored once, we do not invoke the client callback again */
   if(ctx->errored)
     return CURLE_WRITE_ERROR;
 
index ec97bd73336b73fe61518b9051e29d9cb9ae7f67..3552cba7b55452590fc22f2b34aeb400c3bf9767 100644 (file)
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -79,7 +79,7 @@ static const char *doh_strerror(DOHcode code)
 UNITTEST DOHcode doh_req_encode(const char *host,
                                 DNStype dnstype,
                                 unsigned char *dnsp, /* buffer */
-                                size_t len,  /* buffer size */
+                                size_t len,   /* buffer size */
                                 size_t *olen) /* output length */
 {
   const size_t hostlen = strlen(host);
@@ -158,9 +158,9 @@ UNITTEST DOHcode doh_req_encode(const char *host,
 
   *dnsp++ = 0; /* append zero-length label for root */
 
-  /* There are assigned TYPE codes beyond 255: use range [1..65535]  */
+  /* There are assigned TYPE codes beyond 255: use range [1..65535] */
   *dnsp++ = (unsigned char)(255 & (dnstype >> 8)); /* upper 8 bit TYPE */
-  *dnsp++ = (unsigned char)(255 & dnstype);      /* lower 8 bit TYPE */
+  *dnsp++ = (unsigned char)(255 & dnstype);        /* lower 8 bit TYPE */
 
   *dnsp++ = '\0'; /* upper 8 bit CLASS */
   *dnsp++ = DNS_CLASS_IN; /* IN - "the Internet" */
@@ -677,7 +677,7 @@ static DOHcode doh_rdata(const unsigned char *doh,
                          struct dohentry *d)
 {
   /* RDATA
-     - A (TYPE 1):  4 bytes
+     - A (TYPE 1): 4 bytes
      - AAAA (TYPE 28): 16 bytes
      - NS (TYPE 2): N bytes
      - HTTPS (TYPE 65): N bytes */
@@ -707,7 +707,7 @@ static DOHcode doh_rdata(const unsigned char *doh,
       return rc;
     break;
   case CURL_DNS_TYPE_DNAME:
-    /* explicit for clarity; just skip; rely on synthesized CNAME  */
+    /* explicit for clarity; just skip; rely on synthesized CNAME */
     break;
   default:
     /* unsupported type, just skip it */
index 2064f4d05fb378d953a5fd0a2001afe15cca311b..fdc6e438ab3e771988278eb819d8490d64b9263e 100644 (file)
@@ -23,7 +23,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. */
 
 #include "curl_setup.h"
 
index 74a73028cd8c72fe5d05ae3e0972a2e4604fc274..416bcad4f57d4f74b205a667e2617626991d693a 100644 (file)
@@ -289,7 +289,7 @@ static CURLFORMcode FormAddCheck(struct FormInfo *first_form,
                         HTTPPOST_PTRCONTENTS | HTTPPOST_PTRBUFFER |
                         HTTPPOST_CALLBACK)) && form->value) {
       /* copy value (without strdup; possibly contains null characters) */
-      size_t clen  = (size_t) form->contentslength;
+      size_t clen = (size_t) form->contentslength;
       if(!clen)
         clen = strlen(form->value) + 1;
 
@@ -547,7 +547,7 @@ CURLFORMcode FormAdd(struct curl_httppost **httppost,
         retval = CURL_FORMADD_OPTION_TWICE;
       else {
         if(!array_state)
-          avalue  = va_arg(params, char *);
+          avalue = va_arg(params, char *);
         if(avalue) {
           curr->userp = avalue;
           curr->value = avalue; /* this is not strictly true but we derive a
index 4858ae230f14526f5650fbb4e72402b79e0e896c..819fab462b93059c8688a7af06f68f8e538f4ca7 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1115,7 +1115,6 @@ static CURLcode ftp_state_use_port(struct Curl_easy *data,
     port++;
   }
 
-
   /* get the name again after the bind() so that we can extract the
      port number it uses now */
   sslen = sizeof(ss);
@@ -1976,7 +1975,6 @@ static CURLcode ftp_state_pasv_resp(struct Curl_easy *data,
     goto error;
   }
 
-
   /*
    * When this is used from the multi interface, this might've returned with
    * the 'connected' set to FALSE and thus we are now awaiting a non-blocking
@@ -2488,7 +2486,6 @@ static CURLcode ftp_state_get_resp(struct Curl_easy *data,
 
     data->req.size = -1; /* default unknown size */
 
-
     /*
      * It appears that there are FTP-servers that return size 0 for files when
      * SIZE is used on the file while being in BINARY mode. To work around
index 529c3c907d6035b3129ccb406dd6c090b0f53766..f3cf228bf27416f5f615714f239ca1e3c7780293 100644 (file)
@@ -4081,7 +4081,7 @@ static CURLcode http_on_response(struct Curl_easy *data,
     k->download_done = TRUE;
 
   /* If max download size is *zero* (nothing) we already have
-     nothing and can safely return ok now!  But for HTTP/2, we would
+     nothing and can safely return ok now! But for HTTP/2, we would
      like to call http2_handle_stream_close to properly close a
      stream. In order to do this, we keep reading until we
      close the stream. */
index 098dd7cd64f846310a892b9429dc7d332e538168..0403e95ba20b1ae3eca39d002bb6f5ae21d37548 100644 (file)
@@ -84,7 +84,7 @@ static ssize_t detect_line(struct h1_req_parser *parser,
                            const char *buf, const size_t buflen,
                            CURLcode *err)
 {
-  const char  *line_end;
+  const char *line_end;
 
   DEBUGASSERT(!parser->line);
   line_end = memchr(buf, '\n', buflen);
@@ -136,7 +136,7 @@ static ssize_t next_line(struct h1_req_parser *parser,
 static CURLcode start_req(struct h1_req_parser *parser,
                           const char *scheme_default, int options)
 {
-  const char  *p, *m, *target, *hv, *scheme, *authority, *path;
+  const char *p, *m, *target, *hv, *scheme, *authority, *path;
   size_t m_len, target_len, hv_len, scheme_len, authority_len, path_len;
   size_t i;
   CURLU *url = NULL;
index 36bfd610333903c4380823f7cc777ef8e5706e28..de1113c1e45f95ea07320329804fa03a7c3c661d 100644 (file)
@@ -796,7 +796,7 @@ static ssize_t send_callback(nghttp2_session *h2,
     ctx->nw_out_blocked = 1;
     return NGHTTP2_ERR_WOULDBLOCK;
   }
-  return (nwritten  > SSIZE_MAX) ?
+  return (nwritten > SSIZE_MAX) ?
     NGHTTP2_ERR_CALLBACK_FAILURE : (ssize_t)nwritten;
 }
 
@@ -2558,7 +2558,7 @@ static CURLcode cf_h2_connect(struct Curl_cfilter *cf,
   }
 
   /* Send out our SETTINGS and ACKs and such. If that blocks, we
-   * have it buffered and  can count this filter as being connected */
+   * have it buffered and can count this filter as being connected */
   result = h2_progress_egress(cf, data);
   if(result && (result != CURLE_AGAIN))
     goto out;
@@ -2945,7 +2945,7 @@ CURLcode Curl_http2_upgrade(struct Curl_easy *data,
   struct cf_h2_ctx *ctx;
   CURLcode result;
 
-  DEBUGASSERT(Curl_conn_http_version(data, conn) <  20);
+  DEBUGASSERT(Curl_conn_http_version(data, conn) < 20);
 
   result = http2_cfilter_add(&cf, data, conn, sockindex, TRUE);
   if(result)
index bb88a0f8ce7bf4f7452f7f234525cc9f3752f370..b5601f45a2cb77e27641f3017e2d71c5500fc8af 100644 (file)
@@ -274,7 +274,6 @@ static CURLcode make_headers(struct Curl_easy *data,
     }
   }
 
-
   if(*content_sha256_header) {
     tmp_head = curl_slist_append(head, content_sha256_header);
     if(!tmp_head)
@@ -412,7 +411,8 @@ fail:
 static const char *parse_content_sha_hdr(struct Curl_easy *data,
                                          const char *provider1,
                                          size_t plen,
-                                         size_t *value_len) {
+                                         size_t *value_len)
+{
   char key[CONTENT_SHA256_KEY_LEN];
   size_t key_len;
   const char *value;
index f0d7ea14f141044a00bb0240ad3051272b8ee36a..c0392d16c4516d50f3e8597d026ebd97b854b411 100644 (file)
@@ -167,7 +167,7 @@ static CURLcode httpsrr_opt(struct Curl_easy *data,
   unsigned short code;
   size_t len = 0;
 
-  code  = ares_dns_rr_get_opt(rr, key, idx, &val, &len);
+  code = ares_dns_rr_get_opt(rr, key, idx, &val, &len);
   return Curl_httpsrr_set(data, hinfo, code, val, len);
 }
 
index 0a56b07bc51b1110b8c60181f241cfc7348621ac..b1f432c0b0441fae9ad9737e1f2d1a0ca3f02a97 100644 (file)
@@ -1966,7 +1966,6 @@ static CURLcode cr_mime_read(struct Curl_easy *data,
   size_t nread;
   char tmp[256];
 
-
   /* Once we have errored, we will return the same error forever */
   if(ctx->errored) {
     CURL_TRC_READ(data, "cr_mime_read(len=%zu) is errored -> %d, eos=0",
index c27e8bdad8b329ebbea80495e443ee0c2118d9d1..efc240b4facc2741648ec8ef21f47457deda94ec 100644 (file)
@@ -2584,7 +2584,7 @@ static CURLMcode multi_runsingle(struct Curl_multi *multi,
       DEBUGASSERT(data->conn);
       if(data->conn->bits.multiplex)
         /* Check if we can move pending requests to send pipe */
-        process_pending_handles(multi); /*  multiplexed */
+        process_pending_handles(multi); /* multiplexed */
 
       /* Only perform the transfer if there is a good socket to work with.
          Having both BAD is a signal to skip immediately to DONE */
index f06587f0172458548633e2b3047d83e0cbbb30eb..9d6174defe3757754e3892e6a7773b0e8ad81164 100644 (file)
@@ -1235,7 +1235,6 @@ static CURLcode oldap_recv(struct Curl_easy *data, int sockindex, char *buf,
         break;
     }
 
-
     if(!result)
       result = client_write(data, STRCONST("\n"), NULL, 0, NULL, 0);
     if(!result)
index b9429db7f67b2515c3c55533e2835d30444c8175..3fa5919c05368aa914354932c24a641965eaaeda 100644 (file)
@@ -362,7 +362,7 @@ static int parsedate(const char *date, time_t *output)
   time_t t = 0;
   int wdaynum = -1;  /* day of the week number, 0-6 (mon-sun) */
   int monnum = -1;   /* month of the year number, 0-11 */
-  int mdaynum = -1; /* day of month, 1 - 31 */
+  int mdaynum = -1;  /* day of month, 1 - 31 */
   int hournum = -1;
   int minnum = -1;
   int secnum = -1;
index 470199a6ff84bc1a9e90fca616d47681fdf4a4e3..d0959470bea5da1645fc711c0d4427558238ec67 100644 (file)
@@ -284,7 +284,7 @@ CURLcode Curl_pp_readresp(struct Curl_easy *data,
       size_t full = curlx_dyn_len(&pp->recvbuf);
 
       /* trim off the "final" leading part */
-      curlx_dyn_tail(&pp->recvbuf, full -  pp->nfinal);
+      curlx_dyn_tail(&pp->recvbuf, full - pp->nfinal);
 
       pp->nfinal = 0; /* now gone */
     }
index 1fa568325bbf7749440b674a1cc524848dc35545..9778a0c95372f3b9bc2a43aec1fc59b83a9aef0a 100644 (file)
@@ -64,7 +64,7 @@ CURLcode Curl_req_soft_reset(struct SingleRequest *req,
   req->header = FALSE;
   req->headerline = 0;
   req->headerbytecount = 0;
-  req->allheadercount =  0;
+  req->allheadercount = 0;
   req->deductheadercount = 0;
   req->httpversion_sent = 0;
   req->httpversion = 0;
@@ -132,7 +132,7 @@ void Curl_req_hard_reset(struct SingleRequest *req, struct Curl_easy *data)
   req->writebytecount = 0;
   req->start = t0;
   req->headerbytecount = 0;
-  req->allheadercount =  0;
+  req->allheadercount = 0;
   req->deductheadercount = 0;
   req->headerline = 0;
   req->offset = 0;
index 3c3adb06a9cb5d6c17666f4920a5d869c032475e..3f385ed8a54a3c6cf57ee25b7dd2ce3fabd02001 100644 (file)
@@ -1159,7 +1159,6 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
     s->connect_only_ws = (arg == 2);
     break;
 
-
 #ifdef USE_SSH
   case CURLOPT_SSH_AUTH_TYPES:
     s->ssh_auth_types = (int)arg;
@@ -1683,7 +1682,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
     /*
      * A string with POST data. Makes curl HTTP POST. Even if it is NULL.
      * If needed, CURLOPT_POSTFIELDSIZE must have been set prior to
-     *  CURLOPT_COPYPOSTFIELDS and not altered later.
+     * CURLOPT_COPYPOSTFIELDS and not altered later.
      */
     if(!ptr || s->postfieldsize == -1)
       result = Curl_setstropt(&s->str[STRING_COPYPOSTFIELDS], ptr);
index 3d4f36364bfaac791574ec5ed6f7143499773caf..f36459634ebbdf64ce5f80796b1e73b314e455a8 100644 (file)
@@ -1881,7 +1881,7 @@ static CURLcode smtp_parse_address(const char *fqma, char **address,
 
   /* Duplicate the fully qualified email address so we can manipulate it,
      ensuring it does not contain the delimiters if specified */
-  char *dup = strdup(fqma[0] == '<' ? fqma + 1  : fqma);
+  char *dup = strdup(fqma[0] == '<' ? fqma + 1 : fqma);
   if(!dup)
     return CURLE_OUT_OF_MEMORY;
 
index 9936aaf5bb15a2ce96c59e14b0cb012dda6ae4f7..5daf5393cd14fcf82543eb16c4ad74055fd85d82 100644 (file)
@@ -528,7 +528,7 @@ process_state:
       /* socks4a, not resolving locally, sends the hostname.
        * add an invalid address + user + hostname */
       unsigned char buf[4] = { 0, 0, 0, 1 };
-      size_t hlen =  strlen(sx->hostname) + 1; /* including NUL */
+      size_t hlen = strlen(sx->hostname) + 1; /* including NUL */
 
       if(hlen > 255) {
         failf(data, "SOCKS4: too long hostname");
index 929132f570a3fdc399adfa7f0919e68f298472f0..30fefa5a6d3c3e5663d420d98106d64bb50f48b3 100644 (file)
@@ -132,7 +132,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
   const size_t serviceptr_length = strlen(serviceptr);
   gss_ctx_id_t gss_context = GSS_C_NO_CONTEXT;
 
-
   /*   GSS-API request looks like
    * +----+------+-----+----------------+
    * |VER | MTYP | LEN |     TOKEN      |
index a7aa81b75d8e400f8acae987876e36d4f32d1413..31645527a36f9f6d74e26e9b5059cf6ed6aef2af 100644 (file)
@@ -87,7 +87,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
   unsigned long qop;
   unsigned char socksreq[4]; /* room for GSS-API exchange header only */
   const char *service = data->set.str[STRING_PROXY_SERVICE_NAME] ?
-    data->set.str[STRING_PROXY_SERVICE_NAME]  : "rcmd";
+                        data->set.str[STRING_PROXY_SERVICE_NAME] : "rcmd";
   char *etbuf;
   size_t etbuf_size;
 
@@ -156,7 +156,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
   (void)curlx_nonblock(sock, FALSE);
 
   /* As long as we need to keep sending some context info, and there is no  */
-  /* errors, keep sending it...                                            */
+  /* errors, keep sending it...                                             */
   for(;;) {
     TCHAR *sname;
 
@@ -505,7 +505,6 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(struct Curl_cfilter *cf,
     goto error;
   }
 
-
   if(!data->set.socks5_gssapi_nec) {
     wrap_desc.cBuffers = 2;
     sspi_w_token[0].BufferType = SECBUFFER_STREAM;
index d9d978c24e906e4edd0ba7351f84bea642c971f4..ffea60f62190fad0ba9317a870c613997bb7970e 100644 (file)
@@ -477,7 +477,7 @@ static CURLcode tftp_send_first(struct tftp_conn *state,
 
     curl_msnprintf((char *)state->spacket.data + 2,
                    state->blksize,
-                   "%s%c%s%c", filename, '\0',  mode, '\0');
+                   "%s%c%s%c", filename, '\0', mode, '\0');
     sbytes = 4 + strlen(filename) + strlen(mode);
 
     /* optional addition of TFTP options */
index f0fe7d3d41350c5607c33fffced9ad338d464cc3..e816da442a165eb6849ad49659bc4ee6e5bf10f8 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2187,7 +2187,6 @@ static CURLcode parse_proxy(struct Curl_easy *data,
   bool is_unix_proxy = FALSE;
 #endif
 
-
   if(!uhp) {
     result = CURLE_OUT_OF_MEMORY;
     goto error;
index 935468f3a65e3bc940f3ed3f2e49ae8fe0c823ee..9cf554d3b06194e5bc90067cf92bd7fc70633674 100644 (file)
@@ -66,7 +66,6 @@ bool Curl_auth_is_spnego_supported(void)
     Curl_pSecFn->FreeContextBuffer(SecurityPackage);
   }
 
-
   return status == SEC_E_OK;
 }
 
index f72f6630f5230d2993313ac6944eed62aa938825..36bd28926d1e74b1c3964f899d55cd20fd5ddb9d 100644 (file)
@@ -1214,7 +1214,8 @@ static int cb_h3_stop_sending(nghttp3_conn *conn, int64_t stream_id,
 
 static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t sid,
                               uint64_t app_error_code, void *user_data,
-                              void *stream_user_data) {
+                              void *stream_user_data)
+{
   struct Curl_cfilter *cf = user_data;
   struct cf_ngtcp2_ctx *ctx = cf->ctx;
   curl_int64_t stream_id = (curl_int64_t)sid;
index e30cfc648a3021dfe318dd1a1968c7d11f3a0c0f..50051041df36ba62992f59541711f1f81b0de56f 100644 (file)
@@ -951,7 +951,8 @@ static int cb_h3_stop_sending(nghttp3_conn *conn, int64_t sid,
 
 static int cb_h3_reset_stream(nghttp3_conn *conn, int64_t sid,
                               uint64_t app_error_code, void *user_data,
-                              void *stream_user_data) {
+                              void *stream_user_data)
+{
   struct Curl_cfilter *cf = user_data;
   struct cf_osslq_ctx *ctx = cf->ctx;
   struct Curl_easy *data = stream_user_data;
index a2ab24bae73c5a5254b058f8c82494bf8288d3a4..fc1c55526e474f6e0dae4bd593b766102b12bbef 100644 (file)
@@ -869,7 +869,6 @@ static CURLcode cf_quiche_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
   if(!stream)
     return CURLE_RECV_ERROR;
 
-
   if(!Curl_bufq_is_empty(&stream->recvbuf)) {
     result = Curl_bufq_cread(&stream->recvbuf, buf, len, pnread);
     CURL_TRC_CF(data, cf, "[%" FMT_PRIu64 "] read recvbuf(len=%zu) "
index 7533001eaf2e34e1bdf03c36119d1eea798a8806..33f7fe092ba0eb1e5baa240266f4d60f4347716b 100644 (file)
@@ -155,7 +155,6 @@ static CURLcode do_sendmsg(struct Curl_cfilter *cf,
   }
 #endif
 
-
   while((sent = sendmsg(qctx->sockfd, &msg, 0)) == -1 &&
         SOCKERRNO == SOCKEINTR)
     ;
index af3767ca71091e79d1a244735a008fb30bb8d80f..f5de9f3e84fbf38e5cc59b09db41ccafffa9b130 100644 (file)
@@ -297,7 +297,6 @@ static void myssh_set_state(struct Curl_easy *data,
     "QUIT"
   };
 
-
   if(sshc->state != nowstate) {
     infof(data, "SSH %p state change from %s to %s (line %d)",
           (void *) sshc, names[sshc->state], names[nowstate],
@@ -2439,7 +2438,6 @@ static CURLcode myssh_statemach_act(struct Curl_easy *data,
     }
   } while(!rc && (sshc->state != SSH_STOP));
 
-
   if(rc == SSH_AGAIN) {
     /* we would block, we need to wait for the socket to be ready (in the
        right direction too)! */
index 5990da25bf41c3e5929e3c691c709f7b41bddb7c..ee82396753c93eaa6ea846e7d02f283ea6474343 100644 (file)
@@ -3573,9 +3573,9 @@ static CURLcode ssh_do(struct Curl_easy *data, bool *done)
   Curl_pgrsSetDownloadSize(data, -1);
 
   if(conn->handler->protocol & CURLPROTO_SCP)
-    result = scp_perform(data, &connected,  done);
+    result = scp_perform(data, &connected, done);
   else
-    result = sftp_perform(data, &connected,  done);
+    result = sftp_perform(data, &connected, done);
 
   return result;
 }
index 40d8ad5b45e00691cf1820c293daf7ebec57debf..754a5f2f898d784e0dbe31ff3fd33ccd59b4348d 100644 (file)
@@ -636,7 +636,6 @@ CURLcode Curl_gtls_client_trust_setup(struct Curl_cfilter *cf,
   CURLcode result;
   int rc;
 
-
   /* Consider the X509 store cacheable if it comes exclusively from a CAfile,
      or no source is provided and we are falling back to OpenSSL's built-in
      default. */
@@ -1969,7 +1968,8 @@ out:
  */
 static CURLcode gtls_connect_common(struct Curl_cfilter *cf,
                                     struct Curl_easy *data,
-                                    bool *done) {
+                                    bool *done)
+{
   struct ssl_connect_data *connssl = cf->ctx;
   struct gtls_ssl_backend_data *backend =
       (struct gtls_ssl_backend_data *)connssl->backend;
index ea8981b3cda9256502fb87d3c8a11ccdec1e1102..4e8a0c3cf7997d92986d4d96f0889719f28e8b70 100644 (file)
@@ -847,7 +847,6 @@ mbed_connect_step1(struct Curl_cfilter *cf, struct Curl_easy *data)
                                   mbedtls_ssl_list_ciphersuites());
   }
 
-
 #ifdef MBEDTLS_SSL_RENEGOTIATION
   mbedtls_ssl_conf_renegotiation(&backend->config,
                                  MBEDTLS_SSL_RENEGOTIATION_ENABLED);
index 2173b3be88ba5c453692e7f08c2e87ba2a2e6f4f..ecf4d03152535541c7bbf1bfe8ea71be7031c47c 100644 (file)
@@ -657,7 +657,8 @@ cleanup:
 static void
 init_config_builder_alpn(struct Curl_easy *data,
                          const struct ssl_connect_data *connssl,
-                         struct rustls_client_config_builder *config_builder) {
+                         struct rustls_client_config_builder *config_builder)
+{
   struct alpn_proto_buf proto;
   rustls_slice_bytes alpn[ALPN_ENTRIES_MAX];
   size_t i;
@@ -709,7 +710,8 @@ init_config_builder_verifier(struct Curl_easy *data,
                              struct rustls_client_config_builder *builder,
                              const struct ssl_primary_config *conn_config,
                              const struct curl_blob *ca_info_blob,
-                             const char * const ssl_cafile) {
+                             const char * const ssl_cafile)
+{
   const struct rustls_root_cert_store *roots = NULL;
   struct rustls_root_cert_store_builder *roots_builder = NULL;
   struct rustls_web_pki_server_cert_verifier_builder *verifier_builder = NULL;
index 50b81f672590005999e1ec53653b841114ce49c8..f9d697bbb8448cc41a65d4b8bdb191e45868b7bd 100644 (file)
@@ -2646,7 +2646,6 @@ static CURLcode schannel_pkp_pin_peer_pubkey(struct Curl_cfilter *cf,
       break; /* failed */
     }
 
-
     if(!(((pCertContextServer->dwCertEncodingType & X509_ASN_ENCODING) != 0) &&
          (pCertContextServer->cbCertEncoded > 0)))
       break;
index df0449cbeee6e1f49af8f53023fd94600e92d976..3b7a095c8b75ae2db68e6cec3612077d46bf0197 100644 (file)
@@ -1952,7 +1952,7 @@ CURLcode Curl_alpn_to_proto_buf(struct alpn_proto_buf *buf,
     len = strlen(spec->entries[i]);
     if(len >= ALPN_NAME_MAX)
       return CURLE_FAILED_INIT;
-    blen = (unsigned  char)len;
+    blen = (unsigned char)len;
     if(off + blen + 1 >= (int)sizeof(buf->data))
       return CURLE_FAILED_INIT;
     buf->data[off++] = blen;
index 9639709fdbe0ef386f866ac8275635c599c0bcbe..19e8c5558aec3c8fe376b444342e5b60817b9a5c 100644 (file)
@@ -578,7 +578,7 @@ wssl_setup_session(struct Curl_cfilter *cf,
           if(sess_reuse_cb) {
             result = sess_reuse_cb(cf, data, alpns, scs, &do_early_data);
             if(result)
-              goto  out;
+              goto out;
           }
 #ifdef WOLFSSL_EARLY_DATA
           if(do_early_data) {
index c5fc86351524197bbbb30e526b77fcf71f8b969b..96eb512b9038584162b448094e782fc2a8ec0a31 100644 (file)
@@ -191,7 +191,7 @@ static const char *getASN1Element_(struct Curl_asn1Element *elem,
      if an error occurs. */
   if(!beg || !end || beg >= end || !*beg ||
      ((size_t)(end - beg) > CURL_ASN1_MAX) ||
-     lvl >=  CURL_ASN1_MAX_RECURSIONS)
+     lvl >= CURL_ASN1_MAX_RECURSIONS)
     return NULL;
 
   /* Process header byte. */
index 683841ecbbf1a8f2bd5b8c08ea22f8081796ba71..891a53dbb458e69ea10707897fcef40f4f21fab8 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -1560,7 +1560,6 @@ CURLcode curl_ws_recv(CURL *d, void *buffer,
     return CURLE_BAD_FUNCTION_ARGUMENT;
   }
 
-
   memset(&ctx, 0, sizeof(ctx));
   ctx.data = data;
   ctx.ws = ws;
index 90bcb4c3599c6d35f545394a553e738609c908f7..1c90847cd25d94b12ff5afac52a094b92570469a 100644 (file)
@@ -173,7 +173,7 @@ static int sys_crelnm(const char *logname,
 }
 
 
- /* Start of DECC RTL Feature handling */
+/* Start of DECC RTL Feature handling */
 
 /*
 ** Sets default value for a feature
@@ -213,7 +213,6 @@ static void set_features(void)
   /* We always want the new parse style */
   set_feature_default("DECC$ARGV_PARSE_STYLE", ENABLE);
 
-
   /* Unless we are in POSIX compliant mode, we want the old POSIX root
    * enabled.
    */
@@ -244,7 +243,7 @@ static void set_features(void)
   /* Gets rid of output logs with single character lines in them. */
   set_feature_default("DECC$STDIO_CTX_EOL", ENABLE);
 
-  /* Fix mv aa.bb aa  */
+  /* Fix mv aa.bb aa */
   set_feature_default("DECC$RENAME_NO_INHERIT", ENABLE);
 
   if(use_unix_settings) {
@@ -283,7 +282,7 @@ static void set_features(void)
   /* Set strtol to proper behavior */
   set_feature_default("DECC$STRTOL_ERANGE", ENABLE);
 
-  /* Commented here to prevent future bugs:  A program or user should */
+  /* 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); */
index f290a288dee715a07d71508ac5673c69ad984671..46a3f200bb3dbc53fc94226ba09217dca52e8222 100644 (file)
@@ -2194,7 +2194,6 @@ static CURLcode run_all_transfers(CURLSH *share,
   global->noprogress = orig_noprogress;
   global->isatty = orig_isatty;
 
-
   return result;
 }
 
index 2fcc7ff85e3d61a894b181016f182dbba9da4193..ad4cd98eb7f569afeeecb729f0a76f67150bb21c 100644 (file)
@@ -253,7 +253,6 @@ bool progress_meter(CURLM *multi,
       speed = dls > uls ? dls : uls;
     }
 
-
     if(dlknown && speed) {
       curl_off_t est = all_dltotal / speed;
       curl_off_t left = (all_dltotal - all_dlnow) / speed;