]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: whitespace
authorViktor Szakats <commit@vsz.me>
Tue, 8 Jul 2025 11:59:32 +0000 (13:59 +0200)
committerViktor Szakats <commit@vsz.me>
Fri, 11 Jul 2025 11:32:54 +0000 (13:32 +0200)
Cherry-picked from #17877
Cherry-picked from #17876

Closes #17896

70 files changed:
docs/libcurl/symbols-in-versions
lib/bufq.h
lib/cf-h1-proxy.c
lib/cf-h2-proxy.c
lib/cf-https-connect.c
lib/cf-socket.c
lib/cf-socket.h
lib/cfilters.c
lib/connect.c
lib/content_encoding.c
lib/cshutdn.c
lib/curl_setup.h
lib/curl_trc.c
lib/curlx/strparse.c
lib/curlx/strparse.h
lib/doh.c
lib/ftp.c
lib/hash.c
lib/hash.h
lib/http2.c
lib/http_aws_sigv4.c
lib/memdebug.c
lib/mime.c
lib/mqtt.c
lib/multi.c
lib/multiif.h
lib/rand.c
lib/sendf.c
lib/socks.c
lib/telnet.c
lib/uint-hash.c
lib/vauth/cleartext.c
lib/vauth/digest.c
lib/vauth/oauth2.c
lib/vquic/curl_msh3.c
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_ngtcp2.h
lib/vquic/curl_osslq.c
lib/vquic/curl_quiche.c
lib/vquic/vquic.c
lib/vquic/vquic_int.h
lib/vssh/libssh2.c
lib/vssh/wolfssh.c
lib/vtls/gtls.c
lib/vtls/rustls.c
lib/vtls/vtls.c
lib/vtls/vtls.h
lib/vtls/vtls_scache.c
lib/vtls/x509asn1.c
src/tool_setup.h
tests/devtest.pl
tests/ftpserver.pl
tests/getpart.pm
tests/libtest/test1013.pl
tests/libtest/test1022.pl
tests/libtest/test307.pl
tests/libtest/test610.pl
tests/libtest/test613.pl
tests/pathhelp.pm
tests/processhelp.pm
tests/runner.pm
tests/runtests.pl
tests/servers.pm
tests/sshserver.pl
tests/test1119.pl
tests/test1135.pl
tests/test1167.pl
tests/test1488.pl
tests/testcurl.pl
tests/testutil.pm

index 54b1d4f222595ad6cda18a7b9f7cdbac2173706c..4603dd322cd98a5f3147e5828d8050a9736d9a86 100644 (file)
@@ -207,18 +207,18 @@ CURLAUTH_BEARER                 7.61.0
 CURLAUTH_DIGEST                 7.10.6
 CURLAUTH_DIGEST_IE              7.19.3
 CURLAUTH_GSSAPI                 7.55.0
-CURLAUTH_GSSNEGOTIATE           7.10.6       7.38.0
+CURLAUTH_GSSNEGOTIATE           7.10.6        7.38.0
 CURLAUTH_NEGOTIATE              7.38.0
 CURLAUTH_NONE                   7.10.6
 CURLAUTH_NTLM                   7.10.6
 CURLAUTH_NTLM_WB                7.22.0                    8.8.0
 CURLAUTH_ONLY                   7.21.3
-CURLCLOSEPOLICY_CALLBACK        7.7          7.16.1
-CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7      7.16.1
-CURLCLOSEPOLICY_LEAST_TRAFFIC   7.7          7.16.1
-CURLCLOSEPOLICY_NONE            7.7          7.16.1
-CURLCLOSEPOLICY_OLDEST          7.7          7.16.1
-CURLCLOSEPOLICY_SLOWEST         7.7          7.16.1
+CURLCLOSEPOLICY_CALLBACK        7.7           7.16.1
+CURLCLOSEPOLICY_LEAST_RECENTLY_USED 7.7       7.16.1
+CURLCLOSEPOLICY_LEAST_TRAFFIC   7.7           7.16.1
+CURLCLOSEPOLICY_NONE            7.7           7.16.1
+CURLCLOSEPOLICY_OLDEST          7.7           7.16.1
+CURLCLOSEPOLICY_SLOWEST         7.7           7.16.1
 CURLE_ABORTED_BY_CALLBACK       7.1
 CURLE_AGAIN                     7.18.2
 CURLE_ALREADY_COMPLETE          7.7.2         7.8
index 63fc9160349d733cecd902ad92ab233d752f30c4..7cd1826a955cc6a52493553813a15e0ddefc2b97 100644 (file)
@@ -170,8 +170,8 @@ CURLcode Curl_bufq_write(struct bufq *q,
                          size_t *pnwritten);
 
 CURLcode Curl_bufq_cwrite(struct bufq *q,
-                         const char *buf, size_t len,
-                         size_t *pnwritten);
+                          const char *buf, size_t len,
+                          size_t *pnwritten);
 
 /**
  * Read buf from the start of the buffer queue. The buf is copied
@@ -206,8 +206,8 @@ bool Curl_bufq_peek_at(struct bufq *q, size_t offset,
 void Curl_bufq_skip(struct bufq *q, size_t amount);
 
 typedef CURLcode Curl_bufq_writer(void *writer_ctx,
-                                 const unsigned char *buf, size_t len,
-                                 size_t *pwritten);
+                                  const unsigned char *buf, size_t len,
+                                  size_t *pwritten);
 /**
  * Passes the chunks in the buffer queue to the writer and returns
  * the amount of buf written. A writer may return -1 and CURLE_AGAIN
index 56c4d88d0b8050382c680ddece56f56b07f03160..4aac877fc1854446413dcc9e5ca350e588d559f9 100644 (file)
@@ -683,8 +683,8 @@ out:
 }
 
 static void cf_h1_proxy_adjust_pollset(struct Curl_cfilter *cf,
-                                        struct Curl_easy *data,
-                                        struct easy_pollset *ps)
+                                       struct Curl_easy *data,
+                                       struct easy_pollset *ps)
 {
   struct h1_tunnel_state *ts = cf->ctx;
 
index b1ad5bc23532c5760f2b73715d3731263b176d58..8a853f6b1d2468b9a8de46c9ae7450c65c89f435 100644 (file)
@@ -81,7 +81,7 @@ struct tunnel_stream {
 };
 
 static CURLcode tunnel_stream_init(struct Curl_cfilter *cf,
-                                    struct tunnel_stream *ts)
+                                   struct tunnel_stream *ts)
 {
   const char *hostname;
   int port;
@@ -268,8 +268,8 @@ static int proxy_h2_client_new(struct Curl_cfilter *cf,
 }
 
 static ssize_t on_session_send(nghttp2_session *h2,
-                              const uint8_t *buf, size_t blen,
-                              int flags, void *userp);
+                               const uint8_t *buf, size_t blen,
+                               int flags, void *userp);
 static int proxy_h2_on_frame_recv(nghttp2_session *session,
                                   const nghttp2_frame *frame,
                                   void *userp);
index 8c3e01e6d8ce57b74e5f927b9fdf01cd2f259dc6..474769d1cbb430257ab93d7a19ba4a2c72b4a8bb 100644 (file)
@@ -424,8 +424,8 @@ static CURLcode cf_hc_shutdown(struct Curl_cfilter *cf,
 }
 
 static void cf_hc_adjust_pollset(struct Curl_cfilter *cf,
-                                  struct Curl_easy *data,
-                                  struct easy_pollset *ps)
+                                 struct Curl_easy *data,
+                                 struct easy_pollset *ps)
 {
   if(!cf->connected) {
     struct cf_hc_ctx *ctx = cf->ctx;
index 4187a6b2cf00d833262024c486e7917ff8e0f0ac..2a7311eb3bd7be1be076e4cb35b98f7189315ccc 100644 (file)
@@ -394,10 +394,10 @@ static CURLcode socket_open(struct Curl_easy *data,
  *
  */
 CURLcode Curl_socket_open(struct Curl_easy *data,
-                            const struct Curl_addrinfo *ai,
-                            struct Curl_sockaddr_ex *addr,
-                            int transport,
-                            curl_socket_t *sockfd)
+                          const struct Curl_addrinfo *ai,
+                          struct Curl_sockaddr_ex *addr,
+                          int transport,
+                          curl_socket_t *sockfd)
 {
   struct Curl_sockaddr_ex dummy;
   CURLcode result;
@@ -1092,7 +1092,7 @@ static CURLcode set_remote_ip(struct Curl_cfilter *cf,
 }
 
 static CURLcode cf_socket_open(struct Curl_cfilter *cf,
-                              struct Curl_easy *data)
+                               struct Curl_easy *data)
 {
   struct cf_socket_ctx *ctx = cf->ctx;
   int error = 0;
@@ -1376,8 +1376,8 @@ out:
 }
 
 static void cf_socket_adjust_pollset(struct Curl_cfilter *cf,
-                                      struct Curl_easy *data,
-                                      struct easy_pollset *ps)
+                                     struct Curl_easy *data,
+                                     struct easy_pollset *ps)
 {
   struct cf_socket_ctx *ctx = cf->ctx;
 
@@ -1992,7 +1992,7 @@ out:
 }
 
 static timediff_t cf_tcp_accept_timeleft(struct Curl_cfilter *cf,
-                                          struct Curl_easy *data)
+                                         struct Curl_easy *data)
 {
   struct cf_socket_ctx *ctx = cf->ctx;
   timediff_t timeout_ms = DEFAULT_ACCEPT_TIMEOUT;
index d3e35098421ec833060336aac78444be33431a2f..90daf079a0147ac00e517fedd4bce260cd916a9c 100644 (file)
@@ -68,10 +68,10 @@ CURLcode Curl_parse_interface(const char *input,
  *
  */
 CURLcode Curl_socket_open(struct Curl_easy *data,
-                            const struct Curl_addrinfo *ai,
-                            struct Curl_sockaddr_ex *addr,
-                            int transport,
-                            curl_socket_t *sockfd);
+                          const struct Curl_addrinfo *ai,
+                          struct Curl_sockaddr_ex *addr,
+                          int transport,
+                          curl_socket_t *sockfd);
 
 int Curl_socket_close(struct Curl_easy *data, struct connectdata *conn,
                       curl_socket_t sock);
index 4c0f48606f2ee16efb41ee8bc591cc945fc42c19..e3247f72c9367c6dc7398aec0eb36e3680ba18f9 100644 (file)
@@ -68,8 +68,8 @@ static void conn_report_connect_stats(struct Curl_easy *data,
                                       struct connectdata *conn);
 
 void Curl_cf_def_adjust_pollset(struct Curl_cfilter *cf,
-                                 struct Curl_easy *data,
-                                 struct easy_pollset *ps)
+                                struct Curl_easy *data,
+                                struct easy_pollset *ps)
 {
   /* NOP */
   (void)cf;
@@ -757,8 +757,8 @@ void Curl_conn_get_current_host(struct Curl_easy *data, int sockindex,
 }
 
 CURLcode Curl_cf_def_cntrl(struct Curl_cfilter *cf,
-                                struct Curl_easy *data,
-                                int event, int arg1, void *arg2)
+                           struct Curl_easy *data,
+                           int event, int arg1, void *arg2)
 {
   (void)cf;
   (void)data;
@@ -952,8 +952,8 @@ CURLcode Curl_conn_keep_alive(struct Curl_easy *data,
 }
 
 size_t Curl_conn_get_max_concurrent(struct Curl_easy *data,
-                                     struct connectdata *conn,
-                                     int sockindex)
+                                    struct connectdata *conn,
+                                    int sockindex)
 {
   CURLcode result;
   int n = 0;
@@ -1040,8 +1040,8 @@ void Curl_pollset_reset(struct Curl_easy *data,
  *
  */
 void Curl_pollset_change(struct Curl_easy *data,
-                       struct easy_pollset *ps, curl_socket_t sock,
-                       int add_flags, int remove_flags)
+                         struct easy_pollset *ps, curl_socket_t sock,
+                         int add_flags, int remove_flags)
 {
   unsigned int i;
 
index 90acdd3a783a48cd52939fdb14d77994bc310638..406206d493d70813ed5402479a4fb594a949ce0b 100644 (file)
@@ -456,7 +456,7 @@ static CURLcode eyeballer_new(struct eyeballer **pballer,
 }
 
 static void baller_close(struct eyeballer *baller,
-                          struct Curl_easy *data)
+                         struct Curl_easy *data)
 {
   if(baller && baller->cf) {
     Curl_conn_cf_discard_chain(&baller->cf, data);
@@ -464,7 +464,7 @@ static void baller_close(struct eyeballer *baller,
 }
 
 static void baller_free(struct eyeballer *baller,
-                         struct Curl_easy *data)
+                        struct Curl_easy *data)
 {
   if(baller) {
     baller_close(baller, data);
@@ -933,8 +933,8 @@ static CURLcode cf_he_shutdown(struct Curl_cfilter *cf,
 }
 
 static void cf_he_adjust_pollset(struct Curl_cfilter *cf,
-                                  struct Curl_easy *data,
-                                  struct easy_pollset *ps)
+                                 struct Curl_easy *data,
+                                 struct easy_pollset *ps)
 {
   struct cf_he_ctx *ctx = cf->ctx;
   size_t i;
@@ -1047,8 +1047,8 @@ static bool cf_he_data_pending(struct Curl_cfilter *cf,
 }
 
 static struct curltime get_max_baller_time(struct Curl_cfilter *cf,
-                                          struct Curl_easy *data,
-                                          int query)
+                                           struct Curl_easy *data,
+                                           int query)
 {
   struct cf_he_ctx *ctx = cf->ctx;
   struct curltime t, tmax;
index bafd99bd77335e134a02d3df0cb5349feb3a4cb1..9ea4a047c88f7ef23588665f06eb600ba0881ca7 100644 (file)
@@ -342,7 +342,7 @@ static CURLcode gzip_do_write(struct Curl_easy *data,
 }
 
 static void gzip_do_close(struct Curl_easy *data,
-                              struct Curl_cwriter *writer)
+                          struct Curl_cwriter *writer)
 {
   struct zlib_writer *zp = (struct zlib_writer *) writer;
   z_stream *z = &zp->z;     /* zlib state structure */
@@ -463,7 +463,7 @@ static CURLcode brotli_do_write(struct Curl_easy *data,
 }
 
 static void brotli_do_close(struct Curl_easy *data,
-                                struct Curl_cwriter *writer)
+                            struct Curl_cwriter *writer)
 {
   struct brotli_writer *bp = (struct brotli_writer *) writer;
   (void) data;
@@ -566,7 +566,7 @@ static CURLcode zstd_do_write(struct Curl_easy *data,
 }
 
 static void zstd_do_close(struct Curl_easy *data,
-                              struct Curl_cwriter *writer)
+                          struct Curl_cwriter *writer)
 {
   struct zstd_writer *zp = (struct zstd_writer *) writer;
   (void)data;
@@ -687,7 +687,7 @@ static CURLcode error_do_write(struct Curl_easy *data,
 }
 
 static void error_do_close(struct Curl_easy *data,
-                               struct Curl_cwriter *writer)
+                           struct Curl_cwriter *writer)
 {
   (void) data;
   (void) writer;
index e5799d611efb5d664d7398f910ab3f79123cb57f..c8b40dc32189b00bce5e2e285b89cca9c6be7773 100644 (file)
@@ -114,8 +114,8 @@ static void cshutdn_run_once(struct Curl_easy *data,
 }
 
 void Curl_cshutdn_run_once(struct Curl_easy *data,
-                      struct connectdata *conn,
-                      bool *done)
+                           struct connectdata *conn,
+                           bool *done)
 {
   DEBUGASSERT(!data->conn);
   Curl_attach_connection(data, conn);
@@ -212,8 +212,8 @@ bool Curl_cshutdn_close_oldest(struct Curl_easy *data,
 #define NUM_POLLS_ON_STACK 10
 
 static CURLcode cshutdn_wait(struct cshutdn *cshutdn,
-                               struct Curl_easy *data,
-                               int timeout_ms)
+                             struct Curl_easy *data,
+                             int timeout_ms)
 {
   struct pollfd a_few_on_stack[NUM_POLLS_ON_STACK];
   struct curl_pollfds cpfds;
@@ -234,7 +234,7 @@ out:
 
 
 static void cshutdn_perform(struct cshutdn *cshutdn,
-                              struct Curl_easy *data)
+                            struct Curl_easy *data)
 {
   struct Curl_llist_node *e = Curl_llist_head(&cshutdn->list);
   struct Curl_llist_node *enext;
@@ -395,8 +395,8 @@ size_t Curl_cshutdn_dest_count(struct Curl_easy *data,
 
 
 static CURLMcode cshutdn_update_ev(struct cshutdn *cshutdn,
-                                     struct Curl_easy *data,
-                                     struct connectdata *conn)
+                                   struct Curl_easy *data,
+                                   struct connectdata *conn)
 {
   CURLMcode mresult;
 
@@ -411,8 +411,8 @@ static CURLMcode cshutdn_update_ev(struct cshutdn *cshutdn,
 
 
 void Curl_cshutdn_add(struct cshutdn *cshutdn,
-                        struct connectdata *conn,
-                        size_t conns_in_pool)
+                      struct connectdata *conn,
+                      size_t conns_in_pool)
 {
   struct Curl_easy *data = cshutdn->multi->admin;
   size_t max_total = (cshutdn->multi->max_total_connections > 0) ?
@@ -444,8 +444,8 @@ void Curl_cshutdn_add(struct cshutdn *cshutdn,
 
 
 static void cshutdn_multi_socket(struct cshutdn *cshutdn,
-                                   struct Curl_easy *data,
-                                   curl_socket_t s)
+                                 struct Curl_easy *data,
+                                 curl_socket_t s)
 {
   struct Curl_llist_node *e;
   struct connectdata *conn;
index 79a658fda5fa44b1522434e0faf5f3dc3a4c394e..00e79414cb8ba4ac31bde5c41ecee5403443ccc7 100644 (file)
 
 #ifdef HTTP_ONLY
 #  ifndef CURL_DISABLE_DICT
-#    define CURL_DISABLE_DICT
+#  define CURL_DISABLE_DICT
 #  endif
 #  ifndef CURL_DISABLE_FILE
-#    define CURL_DISABLE_FILE
+#  define CURL_DISABLE_FILE
 #  endif
 #  ifndef CURL_DISABLE_FTP
-#    define CURL_DISABLE_FTP
+#  define CURL_DISABLE_FTP
 #  endif
 #  ifndef CURL_DISABLE_GOPHER
-#    define CURL_DISABLE_GOPHER
+#  define CURL_DISABLE_GOPHER
 #  endif
 #  ifndef CURL_DISABLE_IMAP
-#    define CURL_DISABLE_IMAP
+#  define CURL_DISABLE_IMAP
 #  endif
 #  ifndef CURL_DISABLE_LDAP
-#    define CURL_DISABLE_LDAP
+#  define CURL_DISABLE_LDAP
 #  endif
 #  ifndef CURL_DISABLE_LDAPS
-#    define CURL_DISABLE_LDAPS
+#  define CURL_DISABLE_LDAPS
 #  endif
 #  ifndef CURL_DISABLE_MQTT
-#    define CURL_DISABLE_MQTT
+#  define CURL_DISABLE_MQTT
 #  endif
 #  ifndef CURL_DISABLE_POP3
-#    define CURL_DISABLE_POP3
+#  define CURL_DISABLE_POP3
 #  endif
 #  ifndef CURL_DISABLE_RTSP
-#    define CURL_DISABLE_RTSP
+#  define CURL_DISABLE_RTSP
 #  endif
 #  ifndef CURL_DISABLE_SMB
-#    define CURL_DISABLE_SMB
+#  define CURL_DISABLE_SMB
 #  endif
 #  ifndef CURL_DISABLE_SMTP
-#    define CURL_DISABLE_SMTP
+#  define CURL_DISABLE_SMTP
 #  endif
 #  ifndef CURL_DISABLE_TELNET
-#    define CURL_DISABLE_TELNET
+#  define CURL_DISABLE_TELNET
 #  endif
 #  ifndef CURL_DISABLE_TFTP
-#    define CURL_DISABLE_TFTP
+#  define CURL_DISABLE_TFTP
 #  endif
 #endif
 
 #    endif
 #  endif
 #  ifndef SIZEOF_OFF_T
-#    define SIZEOF_OFF_T 4
+#  define SIZEOF_OFF_T 4
 #  endif
 #endif
 
index b9cce523d02a8ea9b4d843e777b831fb9b9f8625..334b6e2a1dbb36143057b34653706860188829a9 100644 (file)
@@ -205,7 +205,7 @@ void Curl_failf(struct Curl_easy *data, const char *fmt, ...)
 static void trc_infof(struct Curl_easy *data,
                       struct curl_trc_feat *feat,
                       const char *opt_id, int opt_id_idx,
-                      const char * const fmt, va_list ap)  CURL_PRINTF(5, 0);
+                      const char * const fmt, va_list ap) CURL_PRINTF(5, 0);
 
 static void trc_infof(struct Curl_easy *data,
                       struct curl_trc_feat *feat,
index 992aa156157a51889d4411997354d8ad40b06828..ecdf5b96153d1a445e2a040ed88d6dc7a33241c8 100644 (file)
@@ -43,7 +43,7 @@ void curlx_str_assign(struct Curl_str *out, const char *str, size_t len)
 /* Get a word until the first DELIM or end of string. At least one byte long.
    return non-zero on error */
 int curlx_str_until(const char **linep, struct Curl_str *out,
-                   const size_t max, char delim)
+                    const size_t max, char delim)
 {
   const char *s = *linep;
   size_t len = 0;
@@ -67,7 +67,7 @@ int curlx_str_until(const char **linep, struct Curl_str *out,
 /* Get a word until the first space or end of string. At least one byte long.
    return non-zero on error */
 int curlx_str_word(const char **linep, struct Curl_str *out,
-                  const size_t max)
+                   const size_t max)
 {
   return curlx_str_until(linep, out, max, ' ');
 }
@@ -75,7 +75,7 @@ int curlx_str_word(const char **linep, struct Curl_str *out,
 /* Get a word until a newline byte or end of string. At least one byte long.
    return non-zero on error */
 int curlx_str_untilnl(const char **linep, struct Curl_str *out,
-                     const size_t max)
+                      const size_t max)
 {
   const char *s = *linep;
   size_t len = 0;
@@ -99,7 +99,7 @@ int curlx_str_untilnl(const char **linep, struct Curl_str *out,
 /* Get a "quoted" word. No escaping possible.
    return non-zero on error */
 int curlx_str_quotedword(const char **linep, struct Curl_str *out,
-                        const size_t max)
+                         const size_t max)
 {
   const char *s = *linep;
   size_t len = 0;
index 17bfdb80710c74fa0af3bdc457e0320356117080..6a0bf28d6cbc7e939484b6b446160f41da317770 100644 (file)
@@ -55,17 +55,17 @@ int curlx_str_word(const char **linep, struct Curl_str *out, const size_t max);
 /* Get a word until the first DELIM or end of string
    return non-zero on error */
 int curlx_str_until(const char **linep, struct Curl_str *out, const size_t max,
-                   char delim);
+                    char delim);
 
 /* Get a word until a newline byte or end of string. At least one byte long.
    return non-zero on error */
 int curlx_str_untilnl(const char **linep, struct Curl_str *out,
-                     const size_t max);
+                      const size_t max);
 
 /* Get a "quoted" word. No escaping possible.
    return non-zero on error */
 int curlx_str_quotedword(const char **linep, struct Curl_str *out,
-                        const size_t max);
+                         const size_t max);
 
 /* Advance over a single character.
    return non-zero on error */
index 376437c8b1098e93f45864b91c33c4a80de5e47d..f96ae0824a4103ef98fe385f1b5e07ca49201955 100644 (file)
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -588,7 +588,7 @@ static void doh_store_a(const unsigned char *doh, int index,
 }
 
 static void doh_store_aaaa(const unsigned char *doh, int index,
-                              struct dohentry *d)
+                           struct dohentry *d)
 {
   /* silently ignore addresses over the limit */
   if(d->numaddr < DOH_MAX_ADDR) {
index 60beb2c9d2ab1df10c649e298a7dfaa13f7b0189..5e505887b17e06216d53a3b289b7d3804ee6afb0 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3155,8 +3155,8 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data,
 
 /* called repeatedly until done from multi.c */
 static CURLcode ftp_statemach(struct Curl_easy *data,
-                               struct ftp_conn *ftpc,
-                               bool *done)
+                              struct ftp_conn *ftpc,
+                              bool *done)
 {
   CURLcode result = Curl_pp_statemach(data, &ftpc->pp, FALSE, FALSE);
 
index 8d13aae483af8f315b35cfe882484fdc856a31a9..89f47ed71e259eea1f559aeeb122bf394e97f54b 100644 (file)
@@ -353,7 +353,7 @@ size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num)
 }
 
 size_t curlx_str_key_compare(void *k1, size_t key1_len,
-                            void *k2, size_t key2_len)
+                             void *k2, size_t key2_len)
 {
   if((key1_len == key2_len) && !memcmp(k1, k2, key1_len))
     return 1;
index 314b811e4a4d58c0c17bbaed9893f957eb9717c7..fcd92db6645dbe6c14ef2386e94c7d2357a8d6a1 100644 (file)
@@ -99,7 +99,7 @@ void Curl_hash_clean_with_criterium(struct Curl_hash *h, void *user,
                                     int (*comp)(void *, void *));
 size_t Curl_hash_str(void *key, size_t key_length, size_t slots_num);
 size_t curlx_str_key_compare(void *k1, size_t key1_len, void *k2,
-                            size_t key2_len);
+                             size_t key2_len);
 void Curl_hash_start_iterate(struct Curl_hash *hash,
                              struct Curl_hash_iterator *iter);
 struct Curl_hash_element *
index a8f6ae439f4def05fb90c173c04aa3992ad821dc..36dca426de8a05c68c9d0589526c14da7fcc176f 100644 (file)
@@ -1951,7 +1951,7 @@ static void h2_pri_spec(struct cf_h2_ctx *ctx,
  * Flush any out data pending in the network buffer.
  */
 static CURLcode h2_progress_egress(struct Curl_cfilter *cf,
-                                  struct Curl_easy *data)
+                                   struct Curl_easy *data)
 {
   struct cf_h2_ctx *ctx = cf->ctx;
   struct h2_stream_ctx *stream = H2_STREAM_CTX(ctx, data);
index 74253823591dd3dfd74fc05f06cc4e189d83291d..92c0c1ff4cfd365be15292e233c842b3a6bf7c85 100644 (file)
@@ -537,8 +537,8 @@ static int compare_func(const void *a, const void *b)
 }
 
 UNITTEST CURLcode canon_path(const char *q, size_t len,
-                              struct dynbuf *new_path,
-                              bool do_uri_encode)
+                             struct dynbuf *new_path,
+                             bool do_uri_encode)
 {
   CURLcode result = CURLE_OK;
 
index 5bce90bd93f6dec7a147283719513039914927ef..bdcdcbb9074f7d44d6b5f19cc47d2c417f32788f 100644 (file)
@@ -304,7 +304,7 @@ void curl_dbg_free(void *ptr, int line, const char *source)
 }
 
 curl_socket_t curl_dbg_socket(int domain, int type, int protocol,
-                             int line, const char *source)
+                              int line, const char *source)
 {
   curl_socket_t sockfd;
 
@@ -351,8 +351,8 @@ RECV_TYPE_RETV curl_dbg_recv(RECV_TYPE_ARG1 sockfd, RECV_TYPE_ARG2 buf,
 
 #ifdef HAVE_SOCKETPAIR
 int curl_dbg_socketpair(int domain, int type, int protocol,
-                       curl_socket_t socket_vector[2],
-                       int line, const char *source)
+                        curl_socket_t socket_vector[2],
+                        int line, const char *source)
 {
   int res = (socketpair)(domain, type, protocol, socket_vector);
 
@@ -366,7 +366,7 @@ int curl_dbg_socketpair(int domain, int type, int protocol,
 #endif
 
 curl_socket_t curl_dbg_accept(curl_socket_t s, void *saddr, void *saddrlen,
-                             int line, const char *source)
+                              int line, const char *source)
 {
   struct sockaddr *addr = (struct sockaddr *)saddr;
   curl_socklen_t *addrlen = (curl_socklen_t *)saddrlen;
index 07e141c7030a5aa6961ec850b5b3fac12ed2ca9d..06cd221abfceaa563c7db77b4cbbbe7d00dfc6b3 100644 (file)
@@ -67,12 +67,12 @@ static size_t mime_subparts_read(char *buffer, size_t size, size_t nitems,
 
 /* Encoders. */
 static size_t encoder_nop_read(char *buffer, size_t size, bool ateof,
-                                curl_mimepart *part);
+                               curl_mimepart *part);
 static curl_off_t encoder_nop_size(curl_mimepart *part);
 static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
                                 curl_mimepart *part);
 static size_t encoder_base64_read(char *buffer, size_t size, bool ateof,
-                                curl_mimepart *part);
+                                  curl_mimepart *part);
 static curl_off_t encoder_base64_size(curl_mimepart *part);
 static size_t encoder_qp_read(char *buffer, size_t size, bool ateof,
                               curl_mimepart *part);
@@ -433,7 +433,7 @@ static size_t encoder_7bit_read(char *buffer, size_t size, bool ateof,
 
 /* Base64 content encoder. */
 static size_t encoder_base64_read(char *buffer, size_t size, bool ateof,
-                                curl_mimepart *part)
+                                  curl_mimepart *part)
 {
   struct mime_encoder_state *st = &part->encstate;
   size_t cursize = 0;
index 2af430b3b6c8687454b48b365f3f373ec69917db..90f857dca56cb0b56be4390989e56f7406125c14 100644 (file)
@@ -240,7 +240,7 @@ static int mqtt_encode_len(char *buf, size_t len)
 
 /* add the passwd to the CONNECT packet */
 static int add_passwd(const char *passwd, const size_t plen,
-                       char *pkt, const size_t start, int remain_pos)
+                      char *pkt, const size_t start, int remain_pos)
 {
   /* magic number that need to be set properly */
   const size_t conn_flags_pos = remain_pos + 8;
index fe2cca4039efe0b8774a3691a57421ab2200ee7e..a1679c7b769a622b8934840cb357ea027f6ea741 100644 (file)
@@ -2809,7 +2809,7 @@ CURLMcode curl_multi_cleanup(CURLM *m)
 #ifdef DEBUGBUILD
         if(mid != data->mid) {
           CURL_TRC_M(data, "multi_cleanup: still present with mid=%u, "
-                  "but unexpected data->mid=%u\n", mid, data->mid);
+                     "but unexpected data->mid=%u\n", mid, data->mid);
           DEBUGASSERT(0);
         }
 #endif
@@ -3894,7 +3894,7 @@ void Curl_multi_mark_dirty(struct Curl_easy *data)
 
 #ifdef DEBUGBUILD
 static void multi_xfer_dump(struct Curl_multi *multi, unsigned int mid,
-                             void *entry)
+                            void *entry)
 {
   struct Curl_easy *data = entry;
 
index e68a278a8da5412fbd727dc5f0318260dbbfec94..1ba0d0f83879b652a5fa2d17d1c65b9fc5145166 100644 (file)
@@ -36,7 +36,7 @@ bool Curl_expire_clear(struct Curl_easy *data);
 void Curl_expire_done(struct Curl_easy *data, expire_id id);
 CURLMcode Curl_update_timer(struct Curl_multi *multi) WARN_UNUSED_RESULT;
 void Curl_attach_connection(struct Curl_easy *data,
-                             struct connectdata *conn);
+                            struct connectdata *conn);
 void Curl_detach_connection(struct Curl_easy *data);
 bool Curl_multiplex_wanted(const struct Curl_multi *multi);
 void Curl_set_in_callback(struct Curl_easy *data, bool value);
@@ -106,7 +106,7 @@ void Curl_multi_getsock(struct Curl_easy *data,
  *         CURLE_AGAIN if the buffer is borrowed already.
  */
 CURLcode Curl_multi_xfer_buf_borrow(struct Curl_easy *data,
-                                   char **pbuf, size_t *pbuflen);
+                                    char **pbuf, size_t *pbuflen);
 /**
  * Release the borrowed buffer. All references into the buffer become
  * invalid after this.
index c0368dd76352bfc200f4f013c1921d4a89e37805..72545e086770408e6d5b7c3d55b5055d0d8861e0 100644 (file)
@@ -103,8 +103,8 @@ CURLcode Curl_win32_random(unsigned char *entropy, size_t length)
 #if !defined(USE_SSL)
 /* ---- possibly non-cryptographic version following ---- */
 static CURLcode weak_random(struct Curl_easy *data,
-                          unsigned char *entropy,
-                          size_t length) /* always 4, size of int */
+                            unsigned char *entropy,
+                            size_t length) /* always 4, size of int */
 {
   unsigned int r;
   DEBUGASSERT(length == sizeof(int));
index 243829e273f0c89f9ba0ee6c69755df092feeaf2..339a8773b47fcaacb75f1e3aeea716f765bdcbaf 100644 (file)
@@ -177,8 +177,8 @@ void Curl_creader_set_rewind(struct Curl_easy *data, bool enable)
 
 /* Write data using an unencoding writer stack. */
 CURLcode Curl_cwriter_write(struct Curl_easy *data,
-                             struct Curl_cwriter *writer, int type,
-                             const char *buf, size_t nbytes)
+                            struct Curl_cwriter *writer, int type,
+                            const char *buf, size_t nbytes)
 {
   if(!writer)
     return CURLE_WRITE_ERROR;
@@ -377,9 +377,9 @@ static const struct Curl_cwtype cw_raw = {
 
 /* Create an unencoding writer stage using the given handler. */
 CURLcode Curl_cwriter_create(struct Curl_cwriter **pwriter,
-                                   struct Curl_easy *data,
-                                   const struct Curl_cwtype *cwt,
-                                   Curl_cwriter_phase phase)
+                             struct Curl_easy *data,
+                             const struct Curl_cwtype *cwt,
+                             Curl_cwriter_phase phase)
 {
   struct Curl_cwriter *writer = NULL;
   CURLcode result = CURLE_OUT_OF_MEMORY;
@@ -404,7 +404,7 @@ out:
 }
 
 void Curl_cwriter_free(struct Curl_easy *data,
-                             struct Curl_cwriter *writer)
+                       struct Curl_cwriter *writer)
 {
   if(writer) {
     writer->cwt->do_close(data, writer);
@@ -1368,7 +1368,7 @@ static const struct Curl_crtype cr_buf = {
 };
 
 CURLcode Curl_creader_set_buf(struct Curl_easy *data,
-                               const char *buf, size_t blen)
+                              const char *buf, size_t blen)
 {
   CURLcode result;
   struct Curl_creader *r;
index c7af0f4cb3d6d0590de4b92aaf92192e325238bc..7d25ef52087affc5b9cb002891c7af88cdd6cab8 100644 (file)
@@ -1146,8 +1146,8 @@ static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf,
 }
 
 static void socks_cf_adjust_pollset(struct Curl_cfilter *cf,
-                                     struct Curl_easy *data,
-                                     struct easy_pollset *ps)
+                                    struct Curl_easy *data,
+                                    struct easy_pollset *ps)
 {
   struct socks_state *sx = cf->ctx;
 
index b84b66862cd9b591308cae5bdbab0aad7273be64..bd599dece260eaa25eceab17c443d8c98eca01e9 100644 (file)
@@ -170,7 +170,7 @@ static void sendsuboption(struct Curl_easy *data,
 
 static CURLcode telnet_do(struct Curl_easy *data, bool *done);
 static CURLcode telnet_done(struct Curl_easy *data,
-                                 CURLcode, bool premature);
+                            CURLcode, bool premature);
 static CURLcode send_telnet_data(struct Curl_easy *data,
                                  struct TELNET *tn,
                                  char *buffer, ssize_t nread);
index 58a1cf59f9917fd13a9d71b144267a62e9804630..6c665078876c593c45ff4ab62b083571a9998fcc 100644 (file)
@@ -107,8 +107,8 @@ static void uint_hash_entry_unlink(struct uint_hash *h,
 }
 
 static void uint_hash_elem_link(struct uint_hash *h,
-                                 struct uint_hash_entry **he_anchor,
-                                 struct uint_hash_entry *he)
+                                struct uint_hash_entry **he_anchor,
+                                struct uint_hash_entry *he)
 {
   he->next = *he_anchor;
   *he_anchor = he;
index 719abd196067cb11766530fe9ecae2eec6de7854..8fc5d41b9a38415a64628a9d33053cae7b416481 100644 (file)
@@ -127,7 +127,7 @@ void Curl_auth_create_login_message(const char *valuep, struct bufref *out)
  * Returns void.
  */
 void Curl_auth_create_external_message(const char *user,
-                                           struct bufref *out)
+                                       struct bufref *out)
 {
   /* This is the same formatting as the login message */
   Curl_auth_create_login_message(user, out);
index 9d5fd659d74d49e6a564e7feb5e0271927b3d77a..898629a958f15deb317bcea4b1aef239a6501da0 100644 (file)
@@ -152,7 +152,7 @@ static void auth_digest_md5_to_ascii(unsigned char *source, /* 16 bytes */
 
 /* Convert sha256 or SHA-512/256 chunk to RFC7616 -suitable ASCII string */
 static void auth_digest_sha256_to_ascii(unsigned char *source, /* 32 bytes */
-                                     unsigned char *dest) /* 65 bytes */
+                                        unsigned char *dest) /* 65 bytes */
 {
   int i;
   for(i = 0; i < 32; i++)
index 76e77c6a2f425c362eac70dc92048d644283fd33..a84dc60dafd11e5188d85ed25ac10c32edb73620 100644 (file)
@@ -94,8 +94,8 @@ CURLcode Curl_auth_create_oauth_bearer_message(const char *user,
  * Returns CURLE_OK on success.
  */
 CURLcode Curl_auth_create_xoauth_bearer_message(const char *user,
-                                               const char *bearer,
-                                               struct bufref *out)
+                                                const char *bearer,
+                                                struct bufref *out)
 {
   /* Generate the message */
   char *xoauth = aprintf("user=%s\1auth=Bearer %s\1\1", user, bearer);
index 2f0c9de8487ce96ca09dfaf097ec45029737f219..6566447ba10d12cbd82a5fcbe2212fe584ab8b00 100644 (file)
 static void MSH3_CALL msh3_conn_connected(MSH3_CONNECTION *Connection,
                                           void *IfContext);
 static void MSH3_CALL msh3_conn_shutdown_complete(MSH3_CONNECTION *Connection,
-                                          void *IfContext);
+                                                  void *IfContext);
 static void MSH3_CALL msh3_conn_new_request(MSH3_CONNECTION *Connection,
-                                          void *IfContext,
-                                          MSH3_REQUEST *Request);
+                                            void *IfContext,
+                                            MSH3_REQUEST *Request);
 static void MSH3_CALL msh3_header_received(MSH3_REQUEST *Request,
                                            void *IfContext,
                                            const MSH3_HEADER *Header);
 static bool MSH3_CALL msh3_data_received(MSH3_REQUEST *Request,
-                                        void *IfContext, uint32_t *Length,
-                                        const uint8_t *Data);
+                                         void *IfContext, uint32_t *Length,
+                                         const uint8_t *Data);
 static void MSH3_CALL msh3_complete(MSH3_REQUEST *Request, void *IfContext,
                                     bool Aborted, uint64_t AbortError);
 static void MSH3_CALL msh3_shutdown_complete(MSH3_REQUEST *Request,
@@ -278,7 +278,7 @@ static void MSH3_CALL msh3_conn_connected(MSH3_CONNECTION *Connection,
 }
 
 static void MSH3_CALL msh3_conn_shutdown_complete(MSH3_CONNECTION *Connection,
-                                          void *IfContext)
+                                                  void *IfContext)
 {
   struct Curl_cfilter *cf = IfContext;
   struct cf_msh3_ctx *ctx = cf->ctx;
@@ -291,8 +291,8 @@ static void MSH3_CALL msh3_conn_shutdown_complete(MSH3_CONNECTION *Connection,
 }
 
 static void MSH3_CALL msh3_conn_new_request(MSH3_CONNECTION *Connection,
-                                          void *IfContext,
-                                          MSH3_REQUEST *Request)
+                                            void *IfContext,
+                                            MSH3_REQUEST *Request)
 {
   (void)Connection;
   (void)IfContext;
index c534e905f6eeb7987d7e89f7b37dddca5676cd90..805e52513fb0d78e1d80b2e965f1d31704e81f17 100644 (file)
@@ -374,8 +374,8 @@ static void pktx_init(struct pkt_io_ctx *pktx,
 }
 
 static int cb_h3_acked_req_body(nghttp3_conn *conn, int64_t stream_id,
-                                   uint64_t datalen, void *user_data,
-                                   void *stream_user_data);
+                                uint64_t datalen, void *user_data,
+                                void *stream_user_data);
 
 static ngtcp2_conn *get_conn(ngtcp2_crypto_conn_ref *conn_ref)
 {
@@ -895,8 +895,8 @@ static CURLcode check_and_set_expiry(struct Curl_cfilter *cf,
 }
 
 static void cf_ngtcp2_adjust_pollset(struct Curl_cfilter *cf,
-                                      struct Curl_easy *data,
-                                      struct easy_pollset *ps)
+                                     struct Curl_easy *data,
+                                     struct easy_pollset *ps)
 {
   struct cf_ngtcp2_ctx *ctx = cf->ctx;
   bool want_recv, want_send;
index 884662523f6087d01442efd995526af9ff383c4d..a4ccef49fec0f7454af62eccc41a7b1857c777e8 100644 (file)
@@ -52,9 +52,9 @@ struct Curl_cfilter;
 void Curl_ngtcp2_ver(char *p, size_t len);
 
 CURLcode Curl_cf_ngtcp2_create(struct Curl_cfilter **pcf,
-                             struct Curl_easy *data,
-                             struct connectdata *conn,
-                             const struct Curl_addrinfo *ai);
+                               struct Curl_easy *data,
+                               struct connectdata *conn,
+                               const struct Curl_addrinfo *ai);
 
 bool Curl_conn_is_ngtcp2(const struct Curl_easy *data,
                          const struct connectdata *conn,
index ec3a2e0ad0a2588bcfcaa08cd49c7293b8191a03..90fed6c44f0229519af66980fe78342f3999146a 100644 (file)
@@ -560,7 +560,7 @@ static CURLcode cf_osslq_ssl_err(struct Curl_cfilter *cf,
 }
 
 static CURLcode cf_osslq_verify_peer(struct Curl_cfilter *cf,
-                                  struct Curl_easy *data)
+                                     struct Curl_easy *data)
 {
   struct cf_osslq_ctx *ctx = cf->ctx;
 
@@ -1242,8 +1242,8 @@ struct h3_quic_recv_ctx {
 };
 
 static CURLcode h3_quic_recv(void *reader_ctx,
-                            unsigned char *buf, size_t len,
-                            size_t *pnread)
+                             unsigned char *buf, size_t len,
+                             size_t *pnread)
 {
   struct h3_quic_recv_ctx *x = reader_ctx;
   int rv;
index c4331c46bb80d807a8e522c60c5e6f6b726170eb..920913d288a0a0cbf5594dd5f1d2dee69aae2d6f 100644 (file)
@@ -818,8 +818,8 @@ out:
 }
 
 static CURLcode recv_closed_stream(struct Curl_cfilter *cf,
-                                  struct Curl_easy *data,
-                                  size_t *pnread)
+                                   struct Curl_easy *data,
+                                   size_t *pnread)
 {
   struct cf_quiche_ctx *ctx = cf->ctx;
   struct h3_stream_ctx *stream = H3_STREAM_CTX(ctx, data);
index b5dc44f8aa90b16695c68bf8bc8ae1e8db1ae474..1eb67f516f3914df353e27dd1b7f398f94d2462f 100644 (file)
@@ -308,7 +308,7 @@ CURLcode vquic_flush(struct Curl_cfilter *cf, struct Curl_easy *data,
 }
 
 CURLcode vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
-                        struct cf_quic_ctx *qctx, size_t gsolen)
+                    struct cf_quic_ctx *qctx, size_t gsolen)
 {
   qctx->gsolen = gsolen;
   return vquic_flush(cf, data, qctx);
index 4641c3125b01a5d2209e86744b6dac23b5f9dfda..d271368d2902d08bd1b1bcfd0cb7e8db91d9f92a 100644 (file)
@@ -68,7 +68,7 @@ CURLcode vquic_send_blocked_pkts(struct Curl_cfilter *cf,
                                  struct cf_quic_ctx *qctx);
 
 CURLcode vquic_send(struct Curl_cfilter *cf, struct Curl_easy *data,
-                        struct cf_quic_ctx *qctx, size_t gsolen);
+                    struct cf_quic_ctx *qctx, size_t gsolen);
 
 CURLcode vquic_send_tail_split(struct Curl_cfilter *cf, struct Curl_easy *data,
                                struct cf_quic_ctx *qctx, size_t gsolen,
index 5748f671d103954f2f01b9818e099a3c5395608f..d599d3cc509b562ca9f8f62571ab9aed393dc797 100644 (file)
@@ -1797,7 +1797,7 @@ static CURLcode ssh_state_auth_host_init(struct Curl_easy *data,
 }
 
 static CURLcode ssh_state_auth_agent_init(struct Curl_easy *data,
-                                     struct ssh_conn *sshc)
+                                          struct ssh_conn *sshc)
 {
   int rc = 0;
   if((data->set.ssh_auth_types & CURLSSH_AUTH_AGENT)
@@ -1906,7 +1906,7 @@ static CURLcode ssh_state_auth_key_init(struct Curl_easy *data,
 }
 
 static CURLcode ssh_state_auth_key(struct Curl_easy *data,
-                              struct ssh_conn *sshc)
+                                   struct ssh_conn *sshc)
 {
   /* Authentication failed. Continue with keyboard-interactive now. */
   struct connectdata *conn = data->conn;
@@ -2262,7 +2262,7 @@ static CURLcode ssh_state_sftp_quote_unlink(struct Curl_easy *data,
 }
 
 static CURLcode ssh_state_sftp_quote_statvfs(struct Curl_easy *data,
-                                        struct ssh_conn *sshc)
+                                             struct ssh_conn *sshc)
 {
   LIBSSH2_SFTP_STATVFS statvfs;
   int rc = libssh2_sftp_statvfs(sshc->sftp_session, sshc->quote_path1,
@@ -2507,7 +2507,7 @@ static CURLcode ssh_state_sftp_close(struct Curl_easy *data,
 }
 
 static CURLcode ssh_state_sftp_shutdown(struct Curl_easy *data,
-                                   struct ssh_conn *sshc)
+                                        struct ssh_conn *sshc)
 {
   /* during times we get here due to a broken transfer and then the
      sftp_handle might not have been taken down so make sure that is done
@@ -3886,7 +3886,7 @@ static CURLcode sftp_disconnect(struct Curl_easy *data,
 }
 
 static CURLcode sftp_done(struct Curl_easy *data, CURLcode status,
-                               bool premature)
+                          bool premature)
 {
   struct connectdata *conn = data->conn;
   struct ssh_conn *sshc = Curl_conn_meta_get(conn, CURL_META_SSH_CONN);
index 000ca457f74e4e2ae8b0c932f5940a1caa249a54..eed73fd9192871469c2b9df5e71b121eac79218a 100644 (file)
@@ -1107,7 +1107,7 @@ static void wssh_sshc_cleanup(struct ssh_conn *sshc)
 
 #if 0
 static CURLcode wscp_done(struct Curl_easy *data,
-                         CURLcode code, bool premature)
+                          CURLcode code, bool premature)
 {
   CURLcode result = CURLE_OK;
   (void)conn;
@@ -1118,7 +1118,7 @@ static CURLcode wscp_done(struct Curl_easy *data,
 }
 
 static CURLcode wscp_doing(struct Curl_easy *data,
-                          bool *dophase_done)
+                           bool *dophase_done)
 {
   CURLcode result = CURLE_OK;
   (void)conn;
@@ -1140,7 +1140,7 @@ static CURLcode wscp_disconnect(struct Curl_easy *data,
 #endif
 
 static CURLcode wsftp_done(struct Curl_easy *data,
-                          CURLcode code, bool premature)
+                           CURLcode code, bool premature)
 {
   struct ssh_conn *sshc = Curl_conn_meta_get(data->conn, CURL_META_SSH_CONN);
   (void)premature;
@@ -1153,7 +1153,7 @@ static CURLcode wsftp_done(struct Curl_easy *data,
 }
 
 static CURLcode wsftp_doing(struct Curl_easy *data,
-                           bool *dophase_done)
+                            bool *dophase_done)
 {
   CURLcode result = wssh_multi_statemach(data, dophase_done);
 
index 8186fc7be4cc8815cd0016778ab32b26451178c5..a2d093baef58435f2232a9a9c4eff07bdd67c70b 100644 (file)
@@ -783,9 +783,9 @@ static int gtls_handshake_cb(gnutls_session_t session, unsigned int htype,
 }
 
 static CURLcode gtls_set_priority(struct Curl_cfilter *cf,
-                                 struct Curl_easy *data,
-                                 struct gtls_ctx *gtls,
-                                 const char *priority)
+                                  struct Curl_easy *data,
+                                  struct gtls_ctx *gtls,
+                                  const char *priority)
 {
   struct ssl_primary_config *conn_config = Curl_ssl_cf_get_primary_config(cf);
   struct dynbuf buf;
index 7071df88d990b15e5b05ce9b69a0b7e33e55096f..77688d4e5b46a891a683ef97d22a3b8bc2b8c1cf 100644 (file)
@@ -201,7 +201,7 @@ static ssize_t tls_recv_more(struct Curl_cfilter *cf,
  */
 static CURLcode
 cr_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
-            char *plainbuf, size_t plainlen, size_t *pnread)
+        char *plainbuf, size_t plainlen, size_t *pnread)
 {
   const struct ssl_connect_data *const connssl = cf->ctx;
   struct rustls_ssl_backend_data *const backend =
index 65ba9df0c4f8fe47b1d21dcaa2094c10028a733e..db4e57342e3450c7c12f6f2585c04ad794b4c104 100644 (file)
@@ -486,7 +486,7 @@ static void cf_ctx_free(struct ssl_connect_data *ctx)
 }
 
 CURLcode Curl_ssl_get_channel_binding(struct Curl_easy *data, int sockindex,
-                                       struct dynbuf *binding)
+                                      struct dynbuf *binding)
 {
   if(Curl_ssl->get_channel_binding)
     return Curl_ssl->get_channel_binding(data, sockindex, binding);
@@ -500,7 +500,7 @@ void Curl_ssl_close_all(struct Curl_easy *data)
 }
 
 void Curl_ssl_adjust_pollset(struct Curl_cfilter *cf, struct Curl_easy *data,
-                              struct easy_pollset *ps)
+                             struct easy_pollset *ps)
 {
   struct ssl_connect_data *connssl = cf->ctx;
 
@@ -891,8 +891,8 @@ static CURLcode multissl_connect(struct Curl_cfilter *cf,
 }
 
 static void multissl_adjust_pollset(struct Curl_cfilter *cf,
-                                     struct Curl_easy *data,
-                                     struct easy_pollset *ps)
+                                    struct Curl_easy *data,
+                                    struct easy_pollset *ps)
 {
   if(multissl_setup(NULL))
     return;
index a6cf4e0e740c7ae68ec8383420c0c98f0d05c6f5..c62b8ae258429449d001efaad80a8c66eb2963a6 100644 (file)
@@ -207,7 +207,7 @@ bool Curl_ssl_cert_status_request(void);
  * returned.
  */
 CURLcode Curl_ssl_get_channel_binding(struct Curl_easy *data, int sockindex,
-                                       struct dynbuf *binding);
+                                      struct dynbuf *binding);
 
 #define SSL_SHUTDOWN_TIMEOUT 10000 /* ms */
 
index aaa830bb19bc602f9a5250bb025e86d3fe5c15c1..662539cd89602a196e50181c417f87cd95ccf228 100644 (file)
@@ -373,9 +373,9 @@ void Curl_ssl_scache_unlock(struct Curl_easy *data)
 }
 
 static CURLcode cf_ssl_peer_key_add_path(struct dynbuf *buf,
-                                          const char *name,
-                                          char *path,
-                                          bool *is_local)
+                                         const char *name,
+                                         char *path,
+                                         bool *is_local)
 {
   if(path && path[0]) {
     /* We try to add absolute paths, so that the session key can stay
@@ -407,8 +407,8 @@ static CURLcode cf_ssl_peer_key_add_path(struct dynbuf *buf,
 }
 
 static CURLcode cf_ssl_peer_key_add_hash(struct dynbuf *buf,
-                                          const char *name,
-                                          struct curl_blob *blob)
+                                         const char *name,
+                                         struct curl_blob *blob)
 {
   CURLcode r = CURLE_OK;
   if(blob && blob->len) {
@@ -865,9 +865,9 @@ CURLcode Curl_ssl_scache_put(struct Curl_cfilter *cf,
 }
 
 void Curl_ssl_scache_return(struct Curl_cfilter *cf,
-                           struct Curl_easy *data,
-                           const char *ssl_peer_key,
-                           struct Curl_ssl_session *s)
+                            struct Curl_easy *data,
+                            const char *ssl_peer_key,
+                            struct Curl_ssl_session *s)
 {
   /* See RFC 8446 C.4:
    * "Clients SHOULD NOT reuse a ticket for multiple connections." */
index 7647ad46ee4d3bc52ab391bd0d3f611fe6548886..aa0930e3fcd33c0cb8ad156d92db48bbaa882efb 100644 (file)
@@ -589,7 +589,7 @@ CURLcode Curl_x509_GTime2str(struct dynbuf *store,
  * Return error code.
  */
 static CURLcode UTime2str(struct dynbuf *store,
-                             const char *beg, const char *end)
+                          const char *beg, const char *end)
 {
   const char *tzp;
   size_t tzl;
index c744ea6b72ee26d86a24300b23375e885fb5570d..a661040737b893b233c8b278fc4beb07360ec917 100644 (file)
@@ -58,16 +58,16 @@ extern FILE *tool_stderr;
 #endif
 
 #ifndef CURL_OS
-#  define CURL_OS "unknown"
+#define CURL_OS "unknown"
 #endif
 
 #ifndef UNPRINTABLE_CHAR
-   /* define what to use for unprintable characters */
-#  define UNPRINTABLE_CHAR '.'
+/* define what to use for unprintable characters */
+#define UNPRINTABLE_CHAR '.'
 #endif
 
 #ifndef HAVE_STRDUP
-#  include "tool_strdup.h"
+#include "tool_strdup.h"
 #endif
 
 #ifndef tool_nop_stmt
@@ -78,7 +78,7 @@ extern FILE *tool_stderr;
 #  define CURL_STRICMP(p1, p2)  _stricmp(p1, p2)
 #elif defined(HAVE_STRCASECMP)
 #  ifdef HAVE_STRINGS_H
-#    include <strings.h>
+#  include <strings.h>
 #  endif
 #  define CURL_STRICMP(p1, p2)  strcasecmp(p1, p2)
 #elif defined(HAVE_STRCMPI)
@@ -115,5 +115,4 @@ int tool_ftruncate64(int fd, curl_off_t where);
 #endif /* ! HAVE_FTRUNCATE */
 #endif /* _WIN32 */
 
-
 #endif /* HEADER_CURL_TOOL_SETUP_H */
index 4fb0934e98ed80119340f3599a8d441d5d37f2fa..168e00ec94552ace6fb0eaea4a0649757969fa77 100755 (executable)
@@ -75,7 +75,7 @@ my $is_wsl = $uname_release =~ /Microsoft$/;
 sub logmsg {
     for(@_) {
         my $line = $_;
-        if ($is_wsl) {
+        if($is_wsl) {
             # use \r\n for WSL shell
             $line =~ s/\r?\n$/\r\n/g;
         }
index 6db08b484389946dc80105dc03f3d1e040aa2344..927d4c66a38ba48b1bbf4f05ad67162e73469586 100755 (executable)
@@ -675,7 +675,7 @@ sub disc_handshake {
     print DWRITE "DISC\n";
     my $line;
     my $nr;
-    while (5 == ($nr = sysread DREAD, $line, 5)) {
+    while(5 == ($nr = sysread DREAD, $line, 5)) {
         if($line eq "DATA\n") {
             # Must read the data bytes to stay in sync
             my $i;
@@ -844,7 +844,7 @@ sub MAIL_smtp {
 
     logmsg "MAIL_smtp got $args\n";
 
-    if (!$args) {
+    if(!$args) {
         sendcontrol "501 Unrecognized parameter\r\n";
     }
     else {
@@ -864,15 +864,15 @@ sub MAIL_smtp {
         }
 
         # this server doesn't "validate" MAIL FROM addresses
-        if (length($from)) {
+        if(length($from)) {
             my @found;
             my $valid = 1;
 
             # Check the capabilities for SIZE and if the specified size is
             # greater than the message size then reject it
-            if (@found = grep /^SIZE (\d+)$/, @capabilities) {
-                if ($found[0] =~ /^SIZE (\d+)$/) {
-                    if ($size > $1) {
+            if(@found = grep /^SIZE (\d+)$/, @capabilities) {
+                if($found[0] =~ /^SIZE (\d+)$/) {
+                    if($size > $1) {
                         $valid = 0;
                     }
                 }
@@ -908,10 +908,10 @@ sub RCPT_smtp {
 
         # Validate the to address (only a valid email address inside <> is
         # allowed, such as <user@example.com>)
-        if ((!$smtputf8 && $to =~
-              /^<([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})>$/) ||
-            ($smtputf8 && $to =~
-              /^<([a-zA-Z0-9\x{80}-\x{ff}._%+-]+)\@(([a-zA-Z0-9\x{80}-\x{ff}-]+)\.)+([a-zA-Z]{2,4})>$/)) {
+        if((!$smtputf8 && $to =~
+             /^<([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})>$/) ||
+           ($smtputf8 && $to =~
+             /^<([a-zA-Z0-9\x{80}-\x{ff}._%+-]+)\@(([a-zA-Z0-9\x{80}-\x{ff}-]+)\.)+([a-zA-Z]{2,4})>$/)) {
             sendcontrol "250 Recipient OK\r\n";
         }
         else {
@@ -925,10 +925,10 @@ sub RCPT_smtp {
 sub DATA_smtp {
     my ($args) = @_;
 
-    if ($args) {
+    if($args) {
         sendcontrol "501 Unrecognized parameter\r\n";
     }
-    elsif ($smtp_client !~ /^(\d*)$/) {
+    elsif($smtp_client !~ /^(\d*)$/) {
         sendcontrol "501 Invalid arguments\r\n";
     }
     else {
@@ -946,7 +946,7 @@ sub DATA_smtp {
         my $ulsize=0;
         my $disc=0;
         my $raw;
-        while (5 == (sysread \*SFREAD, $line, 5)) {
+        while(5 == (sysread \*SFREAD, $line, 5)) {
             if($line eq "DATA\n") {
                 my $i;
                 my $eob;
@@ -1074,16 +1074,16 @@ sub VRFY_smtp {
 
         # Validate the username (only a valid local or external username is
         # allowed, such as user or user@example.com)
-        if ((!$smtputf8 && $username =~
-            /^([a-zA-Z0-9._%+-]+)(\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4}))?$/) ||
-            ($smtputf8 && $username =~
-            /^([a-zA-Z0-9\x{80}-\x{ff}._%+-]+)(\@(([a-zA-Z0-9\x{80}-\x{ff}-]+)\.)+([a-zA-Z]{2,4}))?$/)) {
+        if((!$smtputf8 && $username =~
+           /^([a-zA-Z0-9._%+-]+)(\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4}))?$/) ||
+           ($smtputf8 && $username =~
+           /^([a-zA-Z0-9\x{80}-\x{ff}._%+-]+)(\@(([a-zA-Z0-9\x{80}-\x{ff}-]+)\.)+([a-zA-Z]{2,4}))?$/)) {
 
             my @data = getreplydata($smtp_client);
 
             if(!@data) {
-                if ($username !~
-                    /^([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})$/) {
+                if($username !~
+                   /^([a-zA-Z0-9._%+-]+)\@(([a-zA-Z0-9-]+)\.)+([a-zA-Z]{2,4})$/) {
                   push @data, "250 <$username\@example.com>\r\n"
                 }
                 else {
@@ -1184,7 +1184,7 @@ sub LOGIN_imap {
 
     logmsg "LOGIN_imap got $args\n";
 
-    if ($user eq "") {
+    if($user eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1227,7 +1227,7 @@ sub FETCH_imap {
 
     logmsg "FETCH_imap got $args\n";
 
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
     else {
@@ -1355,10 +1355,10 @@ sub STORE_imap {
 
     logmsg "STORE_imap got $args\n";
 
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
-    elsif (($uid eq "") || ($what ne "+Flags") || ($value eq "")) {
+    elsif(($uid eq "") || ($what ne "+Flags") || ($value eq "")) {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1380,10 +1380,10 @@ sub LIST_imap {
 
     logmsg "LIST_imap got $args\n";
 
-    if ($reference eq "") {
+    if($reference eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
-    elsif ($reference eq "verifiedserver") {
+    elsif($reference eq "verifiedserver") {
         # this is the secret command that verifies that this actually is
         # the curl test server
         sendcontrol "* LIST () \"/\" \"WE ROOLZ: $$\"\r\n";
@@ -1415,7 +1415,7 @@ sub LSUB_imap {
 
     logmsg "LSUB_imap got $args\n";
 
-    if ($reference eq "") {
+    if($reference eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1437,7 +1437,7 @@ sub EXAMINE_imap {
 
     logmsg "EXAMINE_imap got $mailbox\n";
 
-    if ($mailbox eq "") {
+    if($mailbox eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1460,7 +1460,7 @@ sub STATUS_imap {
 
     logmsg "STATUS_imap got $args\n";
 
-    if ($mailbox eq "") {
+    if($mailbox eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1482,10 +1482,10 @@ sub SEARCH_imap {
 
     logmsg "SEARCH_imap got $what\n";
 
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
-    elsif ($what eq "") {
+    elsif($what eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1507,7 +1507,7 @@ sub CREATE_imap {
 
     logmsg "CREATE_imap got $args\n";
 
-    if ($args eq "") {
+    if($args eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1523,7 +1523,7 @@ sub DELETE_imap {
 
     logmsg "DELETE_imap got $args\n";
 
-    if ($args eq "") {
+    if($args eq "") {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1540,7 +1540,7 @@ sub RENAME_imap {
 
     logmsg "RENAME_imap got $args\n";
 
-    if (($from_mailbox eq "") || ($to_mailbox eq "")) {
+    if(($from_mailbox eq "") || ($to_mailbox eq "")) {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1551,7 +1551,7 @@ sub RENAME_imap {
 }
 
 sub CHECK_imap {
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
     else {
@@ -1562,10 +1562,10 @@ sub CHECK_imap {
 }
 
 sub CLOSE_imap {
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
-    elsif (!@deleted) {
+    elsif(!@deleted) {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1578,11 +1578,11 @@ sub CLOSE_imap {
 }
 
 sub EXPUNGE_imap {
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
     else {
-        if (!@deleted) {
+        if(!@deleted) {
             # Report the number of existing messages as per the SELECT
             # command
             sendcontrol "* 172 EXISTS\r\n";
@@ -1609,7 +1609,7 @@ sub COPY_imap {
 
     logmsg "COPY_imap got $args\n";
 
-    if (($uid eq "") || ($mailbox eq "")) {
+    if(($uid eq "") || ($mailbox eq "")) {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1633,17 +1633,17 @@ sub UID_imap {
 
     logmsg "UID_imap got $args\n";
 
-    if ($selected eq "") {
+    if($selected eq "") {
         sendcontrol "$cmdid BAD Command received in Invalid state\r\n";
     }
-    elsif (substr($command, 0, 5) eq "FETCH"){
+    elsif(substr($command, 0, 5) eq "FETCH"){
         my $func = $commandfunc{"FETCH"};
         if($func) {
             &$func($args, $command);
         }
     }
-    elsif (($command ne "COPY") &&
-           ($command ne "STORE") && ($command ne "SEARCH")) {
+    elsif(($command ne "COPY") &&
+          ($command ne "STORE") && ($command ne "SEARCH")) {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1668,7 +1668,7 @@ sub NOOP_imap {
         "* 14 FETCH (FLAGS (\\Seen \\Deleted))\r\n",
     );
 
-    if ($args) {
+    if($args) {
         sendcontrol "$cmdid BAD Command Argument\r\n";
     }
     else {
@@ -1750,16 +1750,16 @@ sub APOP_pop3 {
     my ($args) = @_;
     my ($user, $secret) = split(/ /, $args, 2);
 
-    if (!grep /^APOP$/, @capabilities) {
+    if(!grep /^APOP$/, @capabilities) {
         sendcontrol "-ERR Unrecognized command\r\n";
     }
-    elsif (($user eq "") || ($secret eq "")) {
+    elsif(($user eq "") || ($secret eq "")) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
         my $digest = Digest::MD5::md5_hex($POP3_TIMESTAMP, $TEXT_PASSWORD);
 
-        if ($secret ne $digest) {
+        if($secret ne $digest) {
             sendcontrol "-ERR Login failure\r\n";
         }
         else {
@@ -1801,7 +1801,7 @@ sub USER_pop3 {
 
     logmsg "USER_pop3 got $user\n";
 
-    if (!$user) {
+    if(!$user) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
@@ -1879,7 +1879,7 @@ sub DELE_pop3 {
 
     logmsg "DELE_pop3 got $msgid\n";
 
-    if (!$msgid) {
+    if(!$msgid) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
@@ -1894,7 +1894,7 @@ sub DELE_pop3 {
 sub STAT_pop3 {
     my ($args) = @_;
 
-    if ($args) {
+    if($args) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
@@ -1909,7 +1909,7 @@ sub STAT_pop3 {
 sub NOOP_pop3 {
     my ($args) = @_;
 
-    if ($args) {
+    if($args) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
@@ -1927,7 +1927,7 @@ sub UIDL_pop3 {
         "3 4\r\n", # Note that UID 3 is a simulated "deleted" message
     );
 
-    if (!grep /^UIDL$/, @capabilities) {
+    if(!grep /^UIDL$/, @capabilities) {
         sendcontrol "-ERR Unrecognized command\r\n";
     }
     else {
@@ -1952,14 +1952,14 @@ sub TOP_pop3 {
 
     logmsg "TOP_pop3 got $args\n";
 
-    if (!grep /^TOP$/, @capabilities) {
+    if(!grep /^TOP$/, @capabilities) {
         sendcontrol "-ERR Unrecognized command\r\n";
     }
-    elsif (($msgid eq "") || ($lines eq "")) {
+    elsif(($msgid eq "") || ($lines eq "")) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
-        if ($lines == "0") {
+        if($lines == "0") {
             logmsg "retrieve header of mail\n";
         }
         else {
@@ -1986,11 +1986,11 @@ sub TOP_pop3 {
 sub RSET_pop3 {
     my ($args) = @_;
 
-    if ($args) {
+    if($args) {
         sendcontrol "-ERR Protocol error\r\n";
     }
     else {
-        if (@deleted) {
+        if(@deleted) {
             logmsg "resetting @deleted message(s)\n";
 
             @deleted = ();
@@ -2167,7 +2167,7 @@ sub NLST_ftp {
 sub MDTM_ftp {
     my $testno = $_[0];
     my $testpart = "";
-    if ($testno > 10000) {
+    if($testno > 10000) {
         $testpart = $testno % 10000;
         $testno = int($testno / 10000);
     }
@@ -2310,7 +2310,7 @@ sub RETR_ftp {
 
     $testno =~ s/^([^0-9]*)//;
     my $testpart = "";
-    if ($testno > 10000) {
+    if($testno > 10000) {
         $testpart = $testno % 10000;
         $testno = int($testno / 10000);
     }
@@ -2404,7 +2404,7 @@ sub STOR_ftp {
     my $line;
     my $ulsize=0;
     my $disc=0;
-    while (5 == (sysread DREAD, $line, 5)) {
+    while(5 == (sysread DREAD, $line, 5)) {
         if($line eq "DATA\n") {
             my $i;
             sysread DREAD, $i, 5;
@@ -2605,7 +2605,7 @@ sub PASV_ftp {
         }
         alarm 0;
     };
-    if ($@) {
+    if($@) {
         # timed out
         logmsg "$srvrname server timed out awaiting data connection ".
             "on port $pasvport\n";
index a15a4189db1d58dd4f4e08855d95e392e7a6a2d3..3f9ecbb5af73e569fc640c46be97a5096e124f4f 100644 (file)
@@ -366,7 +366,7 @@ sub loadarray {
     my ($filename)=@_;
     my @array;
 
-    if (open(my $temp, "<", "$filename")) {
+    if(open(my $temp, "<", "$filename")) {
         while(<$temp>) {
             push @array, $_;
         }
index 6d10a3223a534d5344b6ae96e9fc62829f64d728..79a6de409d93089e1e13c4ed9995bf77babd939d 100755 (executable)
@@ -24,8 +24,7 @@
 ###########################################################################
 # Determine if curl-config --protocols/--features matches the
 # curl --version protocols/features
-if ( $#ARGV != 2 )
-{
+if($#ARGV != 2) {
     print "Usage: $0 curl-config-script curl-version-output-file features|protocols\n";
     exit 3;
 }
@@ -35,8 +34,7 @@ my $what=$ARGV[2];
 # Read the output of curl --version
 my $curl_protocols="";
 open(CURL, "$ARGV[1]") || die "Can't get curl $what list\n";
-while( <CURL> )
-{
+while(<CURL>) {
     $curl_protocols = $_ if ( /$what:/i );
 }
 close CURL;
@@ -48,8 +46,7 @@ $curl_protocols =~ /\w+: (.*)$/;
 # Read the output of curl-config
 my @curl_config;
 open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config $what list\n";
-while( <CURLCONFIG> )
-{
+while(<CURLCONFIG>) {
     chomp;
     $_ = lc($_) if($what eq "protocols");  # accept uppercase protocols in curl-config
     push @curl_config, $_;
@@ -66,7 +63,7 @@ my $curlproto = join ' ', @curl;
 my $curlconfigproto = join ' ', @curl_config;
 
 my $different = $curlproto ne $curlconfigproto;
-if ($different) {
+if($different) {
     print "Mismatch in $what lists:\n";
     print "curl:        $curlproto\n";
     print "curl-config: $curlconfigproto\n";
index 5c5c02070ff7ef841a6c650bfee3277bc85b4e38..4427d633b52101a6a8891cc1d8fae22379dd1e57 100755 (executable)
@@ -23,8 +23,7 @@
 #
 ###########################################################################
 # Determine if curl-config --version matches the curl --version
-if ( $#ARGV != 2 )
-{
+if($#ARGV != 2) {
     print "Usage: $0 curl-config-script curl-version-output-file version|vernum\n";
     exit 3;
 }
@@ -46,7 +45,7 @@ open(CURLCONFIG, "sh $ARGV[0] --$what|") || die "Can't get curl-config --$what l
 $_ = <CURLCONFIG>;
 chomp;
 my $filever=$_;
-if ( $what eq "version" ) {
+if($what eq "version") {
     if($filever =~ /^libcurl ([\.\d]+((-DEV)|(-rc\d)|(-\d+))?)$/) {
         $curlconfigversion = $1;
     }
@@ -69,7 +68,7 @@ else { # "vernum" case
 close CURLCONFIG;
 
 my $different = $version ne $curlconfigversion;
-if ($different || !$version) {
+if($different || !$version) {
     print "Mismatch in --version:\n";
     print "curl:        $version\n";
     print "curl-config: $curlconfigversion\n";
index 862f0e972982ce7844f289520dccf9104e55f614..ea54b59824c9f225ce437ee65a5d2f6c189ebb1a 100755 (executable)
 #
 ###########################################################################
 # Determine if the given curl executable supports the 'openssl' SSL engine
-if ( $#ARGV != 0 )
-{
+if($#ARGV != 0) {
     print "Usage: $0 curl-executable\n";
     exit 3;
 }
-if (!open(CURL, "@ARGV[0] -s --engine list|"))
-{
+if(!open(CURL, "@ARGV[0] -s --engine list|")) {
     print "Can't get SSL engine list\n";
     exit 2;
 }
-while( <CURL> )
-{
-    exit 0 if ( /openssl/ );
+while(<CURL>) {
+    exit 0 if(/openssl/);
 }
 close CURL;
 print "openssl engine not supported\n";
index 0ef9330684753e07e4708aeb59f83a6466f30229..b37c25286a88692740bdf1df53ff51c96873b07f 100755 (executable)
@@ -23,8 +23,7 @@
 #
 ###########################################################################
 # Perform simple file and directory manipulation in a portable way
-if ( $#ARGV <= 0 )
-{
+if($#ARGV <= 0) {
     print "Usage: $0 mkdir|rmdir|rm|move|gone path1 [path2] [more commands...]\n";
     exit 1;
 }
@@ -33,20 +32,20 @@ use File::Copy;
 while(@ARGV) {
     my $cmd = shift @ARGV;
     my $arg = shift @ARGV;
-    if ($cmd eq "mkdir") {
+    if($cmd eq "mkdir") {
         mkdir $arg || die "$!";
     }
-    elsif ($cmd eq "rmdir") {
+    elsif($cmd eq "rmdir") {
         rmdir $arg || die "$!";
     }
-    elsif ($cmd eq "rm") {
+    elsif($cmd eq "rm") {
         unlink $arg || die "$!";
     }
-    elsif ($cmd eq "move") {
+    elsif($cmd eq "move") {
         my $arg2 = shift @ARGV;
         move($arg,$arg2) || die "$!";
     }
-    elsif ($cmd eq "gone") {
+    elsif($cmd eq "gone") {
         ! -e $arg || die "Path $arg exists";
     } else {
         print "Unsupported command $cmd\n";
index 2d4f390f77cdb026fcaeda116fc9d874e2c417de..bff7b9ddb2303ba7e86043012276276f73e1c22c 100755 (executable)
@@ -25,8 +25,7 @@
 # Prepare a directory with known files and clean up afterwards
 use Time::Local;
 
-if ( $#ARGV < 1 )
-{
+if($#ARGV < 1) {
     print "Usage: $0 prepare|postprocess dir [logfile]\n";
     exit 1;
 }
@@ -37,7 +36,7 @@ sub errout {
     exit 1;
 }
 
-if ($ARGV[0] eq "prepare")
+if($ARGV[0] eq "prepare")
 {
     my $dirname = $ARGV[1];
     mkdir $dirname || errout "$!";
@@ -72,7 +71,7 @@ if ($ARGV[0] eq "prepare")
 
     exit 0;
 }
-elsif ($ARGV[0] eq "postprocess")
+elsif($ARGV[0] eq "postprocess")
 {
     my $dirname = $ARGV[1];
     my $logfile = $ARGV[2];
@@ -88,7 +87,7 @@ elsif ($ARGV[0] eq "postprocess")
 
     rmdir $dirname || die "$!";
 
-    if ($logfile && -s $logfile) {
+    if($logfile && -s $logfile) {
         # Process the directory file to remove all information that
         # could be inconsistent from one test run to the next (e.g.
         # file date) or may be unsupported on some platforms (e.g.
@@ -105,18 +104,18 @@ elsif ($ARGV[0] eq "postprocess")
 
         my @canondir;
         open(IN, "<$logfile") || die "$!";
-        while (<IN>) {
+        while(<IN>) {
             /^(.)(..).(..).(..).\s*(\S+)\s+\S+\s+\S+\s+(\S+)\s+(\S+\s+\S+\s+\S+)\s+(.*)$/;
-            if ($1 eq "d") {
+            if($1 eq "d") {
                 # Skip current and parent directory listing, because some SSH
                 # servers (eg. OpenSSH for Windows) are not listing those
-                if ($8 eq "." || $8 eq "..") {
+                if($8 eq "." || $8 eq "..") {
                     next;
                 }
                 # Erase all directory metadata except for the name, as it is not
                 # consistent for across all test systems and filesystems
                 push @canondir, "d?????????    N U         U               N ???  N NN:NN $8\n";
-            } elsif ($1 eq "-") {
+            } elsif($1 eq "-") {
                 # Ignore group and other permissions, because these may vary on
                 # some systems (e.g. on Windows)
                 # Erase user and group names, as they are not consistent across
index fcf4e9e962d5767ec25225d9a35dc74509622402..571a4d5a6742406b97f4a337ef3f25e28e969a69 100644 (file)
@@ -170,14 +170,14 @@ sub build_sys_abs_path {
 #
 sub exe_ext {
     my ($component, @arr) = @_;
-    if ($ENV{'CURL_TEST_EXE_EXT'}) {
+    if($ENV{'CURL_TEST_EXE_EXT'}) {
         return $ENV{'CURL_TEST_EXE_EXT'};
     }
-    if ($ENV{'CURL_TEST_EXE_EXT_'.$component}) {
+    if($ENV{'CURL_TEST_EXE_EXT_'.$component}) {
         return $ENV{'CURL_TEST_EXE_EXT_'.$component};
     }
-    if ($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys' ||
-        $^O eq 'dos' || $^O eq 'os2') {
+    if($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys' ||
+       $^O eq 'dos' || $^O eq 'os2') {
         return '.exe';
     }
     return '';
index 3919c29bbd6bd594374d1de6cb442510e128fc31..571ed5b34d6f2532033a5ae6bf4dc18521692918 100644 (file)
@@ -78,7 +78,7 @@ sub portable_sleep {
     if($Time::HiRes::VERSION) {
         Time::HiRes::sleep($seconds);
     }
-    elsif (os_is_win()) {
+    elsif(os_is_win()) {
         Win32::Sleep($seconds*1000);
     }
     else {
@@ -138,7 +138,7 @@ sub pidexists {
     if($pid > 0) {
         # verify if currently existing Windows process
         $pid = winpid_to_pid($pid);
-        if ($pid > 4194304 && os_is_win()) {
+        if($pid > 4194304 && os_is_win()) {
             $pid -= 4194304;
             if($^O ne 'MSWin32') {
                 my $filter = "PID eq $pid";
@@ -169,7 +169,7 @@ sub pidterm {
     if($pid > 0) {
         # request the process to quit
         $pid = winpid_to_pid($pid);
-        if ($pid > 4194304 && os_is_win()) {
+        if($pid > 4194304 && os_is_win()) {
             $pid -= 4194304;
             if($^O ne 'MSWin32') {
                 # https://ss64.com/nt/taskkill.html
@@ -194,7 +194,7 @@ sub pidkill {
     if($pid > 0) {
         # request the process to quit
         $pid = winpid_to_pid($pid);
-        if ($pid > 4194304 && os_is_win()) {
+        if($pid > 4194304 && os_is_win()) {
             $pid -= 4194304;
             if($^O ne 'MSWin32') {
                 # https://ss64.com/nt/taskkill.html
@@ -219,7 +219,7 @@ sub pidwait {
 
     $pid = winpid_to_pid($pid);
     # check if the process exists
-    if ($pid > 4194304 && os_is_win()) {
+    if($pid > 4194304 && os_is_win()) {
         if($flags == &WNOHANG) {
             return pidexists($pid)?0:$pid;
         }
index 4df57730e2917cdd1d4c3652d4867ede3cf95129..9ebee0598884f6762005f7afa630acafa4adb92a 100644 (file)
@@ -249,7 +249,7 @@ sub runner_init {
 #######################################################################
 # Loop to execute incoming IPC calls until the shutdown call
 sub event_loop {
-    while () {
+    while() {
         if(ipcrecv()) {
             last;
         }
@@ -607,7 +607,7 @@ sub singletest_startservers {
 
     my $why;
     my $error;
-    if (!$listonly) {
+    if(!$listonly) {
         my @what = getpart("client", "server");
         if(!$what[0]) {
             warn "Test case $testnum has no server(s) specified";
@@ -779,7 +779,7 @@ sub singletest_prepare {
                     mkdir $d; # 0777
                 }
             }
-            if (open(my $outfile, ">", "$filename")) {
+            if(open(my $outfile, ">", "$filename")) {
                 binmode $outfile; # for crapage systems, use binary
                 if($fileattr{'nonewline'}) {
                     # cut off the final newline
@@ -820,7 +820,7 @@ sub singletest_run {
     my %cmdhash = getpartattr("client", "command");
     if((!$cmdhash{'option'}) || ($cmdhash{'option'} !~ /no-output/)) {
         #We may slap on --output!
-        if (!partexists("verify", "stdout") ||
+        if(!partexists("verify", "stdout") ||
                 ($cmdhash{'option'} && $cmdhash{'option'} =~ /force-output/)) {
             $out=" --output $CURLOUT ";
         }
@@ -887,7 +887,7 @@ sub singletest_run {
             }
         }
         $cmdargs .= $cmd;
-        if ($proxy_address) {
+        if($proxy_address) {
             $cmdargs .= " --proxy $proxy_address ";
         }
     }
@@ -1015,7 +1015,7 @@ sub singletest_run {
     $$testtimings{"timetoolini"} = Time::HiRes::time();
 
     # run the command line we built
-    if ($torture) {
+    if($torture) {
         $cmdres = torture($CMDLINE,
                           $testnum,
                           "$gdb --directory $LIBDIR " . shell_quote($DBGCURL) . " -x $LOGDIR/gdbcmd");
@@ -1197,7 +1197,7 @@ sub runner_test_preprocess {
 
         ###############################################################
         # Check that the test environment is fine to run this test case
-        if (!$listonly) {
+        if(!$listonly) {
             $why = singletest_precheck($testnum);
             $error = -1;
         }
index 39e9bca3f781b5200027dee6c125a47472000b53..37efc2a49bd5f1d57061e5f8facd27cbd3fd0b57 100755 (executable)
@@ -202,7 +202,7 @@ sub logmsg {
         if(!$line) {
             next;
         }
-        if ($is_wsl) {
+        if($is_wsl) {
             # use \r\n for WSL shell
             $line =~ s/\r?\n$/\r\n/g;
         }
@@ -303,7 +303,7 @@ delete $ENV{'CURL_CA_BUNDLE'} if($ENV{'CURL_CA_BUNDLE'});
 
 # provide defaults from our config file for ENV vars not explicitly
 # set by the caller
-if (open(my $fd, "<", "config")) {
+if(open(my $fd, "<", "config")) {
     while(my $line = <$fd>) {
         next if ($line =~ /^#/);
         chomp $line;
@@ -315,10 +315,10 @@ if (open(my $fd, "<", "config")) {
 
 # Check if we have nghttpx available and if it talks http/3
 my $nghttpx_h3 = 0;
-if (!$ENV{"NGHTTPX"}) {
+if(!$ENV{"NGHTTPX"}) {
     $ENV{"NGHTTPX"} = checktestcmd("nghttpx");
 }
-if ($ENV{"NGHTTPX"}) {
+if($ENV{"NGHTTPX"}) {
     my $cmd = "\"$ENV{'NGHTTPX'}\" -v 2>$dev_null";
     my $nghttpx_version=join(' ', `$cmd`);
     $nghttpx_h3 = $nghttpx_version =~ /nghttp3\//;
@@ -551,65 +551,65 @@ sub checksystemfeatures {
                 $pwd = sys_native_current_path();
                 $feature{"win32"} = 1;
             }
-            if ($libcurl =~ /\sschannel\b/i) {
+            if($libcurl =~ /\sschannel\b/i) {
                 $feature{"Schannel"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\sopenssl\b/i) {
+            elsif($libcurl =~ /\sopenssl\b/i) {
                 $feature{"OpenSSL"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\sgnutls\b/i) {
+            elsif($libcurl =~ /\sgnutls\b/i) {
                 $feature{"GnuTLS"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\srustls-ffi\b/i) {
+            elsif($libcurl =~ /\srustls-ffi\b/i) {
                 $feature{"rustls"} = 1;
             }
-            elsif ($libcurl =~ /\swolfssl\b/i) {
+            elsif($libcurl =~ /\swolfssl\b/i) {
                 $feature{"wolfssl"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\s(BoringSSL|AWS-LC)\b/i) {
+            elsif($libcurl =~ /\s(BoringSSL|AWS-LC)\b/i) {
                 # OpenSSL compatible API
                 $feature{"OpenSSL"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\slibressl\b/i) {
+            elsif($libcurl =~ /\slibressl\b/i) {
                 # OpenSSL compatible API
                 $feature{"OpenSSL"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\squictls\b/i) {
+            elsif($libcurl =~ /\squictls\b/i) {
                 # OpenSSL compatible API
                 $feature{"OpenSSL"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            elsif ($libcurl =~ /\smbedTLS\b/i) {
+            elsif($libcurl =~ /\smbedTLS\b/i) {
                 $feature{"mbedtls"} = 1;
                 $feature{"SSLpinning"} = 1;
             }
-            if ($libcurl =~ /ares/i) {
+            if($libcurl =~ /ares/i) {
                 $feature{"c-ares"} = 1;
                 $resolver="c-ares";
             }
-            if ($libcurl =~ /nghttp2/i) {
+            if($libcurl =~ /nghttp2/i) {
                 # nghttp2 supports h2c
                 $feature{"h2c"} = 1;
             }
-            if ($libcurl =~ /AppleIDN/) {
+            if($libcurl =~ /AppleIDN/) {
                 $feature{"AppleIDN"} = 1;
             }
-            if ($libcurl =~ /WinIDN/) {
+            if($libcurl =~ /WinIDN/) {
                 $feature{"WinIDN"} = 1;
             }
-            if ($libcurl =~ /libidn2/) {
+            if($libcurl =~ /libidn2/) {
                 $feature{"libidn2"} = 1;
             }
-            if ($libcurl =~ /libssh2/i) {
+            if($libcurl =~ /libssh2/i) {
                 $feature{"libssh2"} = 1;
             }
-            if ($libcurl =~ /libssh\/([0-9.]*)\//i) {
+            if($libcurl =~ /libssh\/([0-9.]*)\//i) {
                 $feature{"libssh"} = 1;
                 if($1 =~ /(\d+)\.(\d+).(\d+)/) {
                     my $v = $1 * 100 + $2 * 10 + $3;
@@ -619,7 +619,7 @@ sub checksystemfeatures {
                     }
                 }
             }
-            if ($libcurl =~ /wolfssh/i) {
+            if($libcurl =~ /wolfssh/i) {
                 $feature{"wolfssh"} = 1;
             }
         }
@@ -734,11 +734,11 @@ sub checksystemfeatures {
         logmsg "unable to get curl's version, further details are:\n";
         logmsg "issued command: \n";
         logmsg "$versioncmd \n";
-        if ($versretval == -1) {
+        if($versretval == -1) {
             logmsg "command failed with: \n";
             logmsg "$versnoexec \n";
         }
-        elsif ($versretval & 127) {
+        elsif($versretval & 127) {
             logmsg sprintf("command died with signal %d, and %s coredump.\n",
                            ($versretval & 127), ($versretval & 128)?"a":"no");
         }
@@ -821,7 +821,7 @@ sub checksystemfeatures {
             die "can't run torture tests since curl was built without ".
                 "TrackMemory feature (--enable-curldebug)";
         }
-        if ($feature{"threaded-resolver"} && !$valgrind) {
+        if($feature{"threaded-resolver"} && !$valgrind) {
             die "can't run torture tests since curl was built with the ".
                 "threaded resolver, and we aren't running with valgrind";
         }
@@ -1121,25 +1121,25 @@ sub singletest_shouldrun {
             my $match;
             for my $k (@info_keywords) {
                 chomp $k;
-                if ($disabled_keywords{lc($k)}) {
-                    if ($k =~ /^feat:/) {
+                if($disabled_keywords{lc($k)}) {
+                    if($k =~ /^feat:/) {
                         $why = "disabled by feature";
                     }
                     else {
                         $why = "disabled by keyword";
                     }
                 }
-                elsif ($enabled_keywords{lc($k)}) {
+                elsif($enabled_keywords{lc($k)}) {
                     $match = 1;
                 }
-                if ($ignored_keywords{lc($k)}) {
+                if($ignored_keywords{lc($k)}) {
                     logmsg "Warning: test$testnum result is ignored due to $k\n";
                     $errorreturncode = 2;
                 }
             }
 
             if(!$why && !$match && %enabled_keywords) {
-                if (grep { /^feat:/ } keys %enabled_keywords) {
+                if(grep { /^feat:/ } keys %enabled_keywords) {
                     $why = "disabled by missing feature";
                 }
                 else {
@@ -1149,24 +1149,24 @@ sub singletest_shouldrun {
         }
     }
 
-    if (!$why && defined $custom_skip_reasons{test}{$testnum}) {
+    if(!$why && defined $custom_skip_reasons{test}{$testnum}) {
         $why = $custom_skip_reasons{test}{$testnum};
     }
 
-    if (!$why && defined $custom_skip_reasons{tool}) {
+    if(!$why && defined $custom_skip_reasons{tool}) {
         foreach my $tool (getpart("client", "tool")) {
             foreach my $tool_skip_pattern (keys %{$custom_skip_reasons{tool}}) {
-                if ($tool =~ /$tool_skip_pattern/i) {
+                if($tool =~ /$tool_skip_pattern/i) {
                     $why = $custom_skip_reasons{tool}{$tool_skip_pattern};
                 }
             }
         }
     }
 
-    if (!$why && defined $custom_skip_reasons{keyword}) {
+    if(!$why && defined $custom_skip_reasons{keyword}) {
         foreach my $keyword (@info_keywords) {
             foreach my $keyword_skip_pattern (keys %{$custom_skip_reasons{keyword}}) {
-                if ($keyword =~ /$keyword_skip_pattern/i) {
+                if($keyword =~ /$keyword_skip_pattern/i) {
                     $why = $custom_skip_reasons{keyword}{$keyword_skip_pattern};
                 }
             }
@@ -1225,7 +1225,7 @@ sub singletest_check {
     my ($runnerid, $testnum, $cmdres, $CURLOUT, $tool, $usedvalgrind)=@_;
 
     # Skip all the verification on torture tests
-    if ($torture) {
+    if($torture) {
         # timestamp test result verification end
         $timevrfyend{$testnum} = Time::HiRes::time();
         return -2;
@@ -1247,7 +1247,7 @@ sub singletest_check {
     my %hash = getpartattr("verify", "stdout");
 
     my $loadfile = $hash{'loadfile'};
-    if ($loadfile) {
+    if($loadfile) {
         open(my $tmp, "<", "$loadfile") || die "Cannot open file $loadfile: $!";
         @validstdout = <$tmp>;
         close($tmp);
@@ -1256,7 +1256,7 @@ sub singletest_check {
         s/\r\n/\n/g for @validstdout;
     }
 
-    if (@validstdout) {
+    if(@validstdout) {
         # verify redirected stdout
         my @actual = loadarray(stdoutfilename($logdir, $testnum));
 
@@ -1302,7 +1302,7 @@ sub singletest_check {
     }
 
     my @validstderr = getpart("verify", "stderr");
-    if (@validstderr) {
+    if(@validstderr) {
         # verify redirected stderr
         my @actual = loadarray(stderrfilename($logdir, $testnum));
 
@@ -1412,7 +1412,7 @@ sub singletest_check {
 
     my %replyattr = getpartattr("reply", "data");
     my @reply;
-    if (partexists("reply", "datacheck")) {
+    if(partexists("reply", "datacheck")) {
         for my $partsuffix (('', '1', '2', '3', '4')) {
             my @replycheckpart = getpart("reply", "datacheck".$partsuffix);
             if(@replycheckpart) {
@@ -1463,7 +1463,7 @@ sub singletest_check {
             normalize_text(\@out);
         }
         $res = compare($runnerid, $testnum, $testname, "data", \@out, \@reply);
-        if ($res) {
+        if($res) {
             return -1;
         }
         $ok .= "d";
@@ -1504,7 +1504,7 @@ sub singletest_check {
         }
 
         $res = compare($runnerid, $testnum, $testname, "upload", \@out, \@upload);
-        if ($res) {
+        if($res) {
             return -1;
         }
         $ok .= "u";
@@ -1568,7 +1568,7 @@ sub singletest_check {
             if(!$filename) {
                 logmsg " $testnum: IGNORED: section verify=>file$partsuffix ".
                        "has no name attribute\n";
-                if (runnerac_stopservers($runnerid)) {
+                if(runnerac_stopservers($runnerid)) {
                     logmsg "ERROR: runner $runnerid seems to have died\n";
                 } else {
 
@@ -1750,10 +1750,10 @@ sub singletest_check {
     if(@notexists) {
         # a list of directory entries that must not exist
         my $err;
-        while (@notexists) {
+        while(@notexists) {
             my $fname = shift @notexists;
             chomp $fname;
-            if (-e $fname) {
+            if(-e $fname) {
                 logmsg "Found '$fname' when not supposed to exist.\n";
                 $err++;
             }
@@ -2248,16 +2248,16 @@ my $number=0;
 my $fromnum=-1;
 my @testthis;
 while(@ARGV) {
-    if ($ARGV[0] eq "-v") {
+    if($ARGV[0] eq "-v") {
         # verbose output
         $verbose=1;
     }
-    elsif ($ARGV[0] eq "-c") {
+    elsif($ARGV[0] eq "-c") {
         # use this path to curl instead of default
         $DBGCURL=$CURL=$ARGV[1];
         shift @ARGV;
     }
-    elsif ($ARGV[0] eq "-vc") {
+    elsif($ARGV[0] eq "-vc") {
         # use this path to a curl used to verify servers
 
         # Particularly useful when you introduce a crashing bug somewhere in
@@ -2267,12 +2267,12 @@ while(@ARGV) {
         $VCURL=shell_quote($ARGV[1]);
         shift @ARGV;
     }
-    elsif ($ARGV[0] eq "-ac") {
+    elsif($ARGV[0] eq "-ac") {
         # use this curl only to talk to APIs (currently only CI test APIs)
         $ACURL=shell_quote($ARGV[1]);
         shift @ARGV;
     }
-    elsif ($ARGV[0] eq "-d") {
+    elsif($ARGV[0] eq "-d") {
         # have the servers display protocol output
         $debugprotocol=1;
     }
@@ -2310,15 +2310,15 @@ while(@ARGV) {
         }
         close($fd);
     }
-    elsif ($ARGV[0] eq "-g") {
+    elsif($ARGV[0] eq "-g") {
         # run this test with gdb
         $gdbthis=1;
     }
-    elsif ($ARGV[0] eq "-gl") {
+    elsif($ARGV[0] eq "-gl") {
         # run this test with lldb
         $gdbthis=2;
     }
-    elsif ($ARGV[0] eq "-gw") {
+    elsif($ARGV[0] eq "-gw") {
         # run this test with windowed gdb
         $gdbthis=1;
         $gdbxwin=1;
@@ -2340,7 +2340,7 @@ while(@ARGV) {
         # disable the valgrind debuginfod functionality
         $no_debuginfod = 1;
     }
-    elsif ($ARGV[0] eq "-R") {
+    elsif($ARGV[0] eq "-R") {
         # execute in scrambled order
         $scrambleorder=1;
     }
@@ -2377,7 +2377,7 @@ while(@ARGV) {
     }
     elsif($ARGV[0] eq "-o") {
         shift @ARGV;
-        if ($ARGV[0] =~ /^(\w+)=([\w.:\/\[\]-]+)$/) {
+        if($ARGV[0] =~ /^(\w+)=([\w.:\/\[\]-]+)$/) {
             my ($variable, $value) = ($1, $2);
             eval "\$$variable='$value'" or die "Failed to set \$$variable to $value: $@";
         } else {
@@ -2570,7 +2570,7 @@ if($valgrind) {
         # (this happened in 2003, so we could probably don't need to care about
         # that old version any longer and just delete this check)
         runclient("valgrind --help 2>&1 | grep -- --tool >$dev_null 2>&1");
-        if (($? >> 8)) {
+        if(($? >> 8)) {
             $valgrind_tool="";
         }
         open(my $curlh, "<", "$CURL");
@@ -2597,7 +2597,7 @@ if($valgrind) {
     }
 }
 
-if ($gdbthis) {
+if($gdbthis) {
     # open the executable curl and read the first 4 bytes of it
     open(my $check, "<", "$CURL");
     my $c;
@@ -2715,7 +2715,7 @@ sub disabledtests {
 # If 'all' tests are requested, find out all test numbers
 #
 
-if ( $TESTCASES eq "all") {
+if($TESTCASES eq "all") {
     # Get all commands and find out their test numbers
     opendir(DIR, $TESTDIR) || die "can't opendir $TESTDIR: $!";
     my @cmds = grep { /^test([0-9]+)$/ && -f "$TESTDIR/$_" } readdir(DIR);
@@ -2742,7 +2742,7 @@ if ( $TESTCASES eq "all") {
 else {
     my $verified="";
     for(split(" ", $TESTCASES)) {
-        if (-e "$TESTDIR/test$_") {
+        if(-e "$TESTDIR/test$_") {
             $verified.="$_ ";
         }
     }
@@ -2792,7 +2792,7 @@ sub displaylogcontent {
             $string =~ tr/\n//;
             for my $line (split(m/\n/, $string)) {
                 $line =~ s/\s*\!$//;
-                if ($truncate) {
+                if($truncate) {
                     push @tail, " $line\n";
                 } else {
                     logmsg " $line\n";
@@ -2944,7 +2944,7 @@ else {
     $retry_left = $retry;
 }
 
-while () {
+while() {
     # check the abort flag
     if($globalabort) {
         logmsg singletest_dumplogs();
index 9a2c57dcdf822a12f56c70652b34c3618f8a6437..c9cc4be24bd40b3cd888dc839cbbd5c712b863f4 100644 (file)
@@ -157,7 +157,7 @@ our $stunnel;        # path to stunnel command
 sub checkcmd {
     my ($cmd, @extrapaths)=@_;
     my @paths;
-    if ($^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'os2') {
+    if($^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'os2') {
         # PATH separator is different
         @paths=(split(';', $ENV{'PATH'}), @extrapaths);
     }
@@ -207,17 +207,17 @@ sub initserverconfig {
 
     # get the name of the current user
     $USER = $ENV{USER};          # Linux
-    if (!$USER) {
+    if(!$USER) {
         $USER = $ENV{USERNAME};     # Windows
     }
-    if (!$USER) {
+    if(!$USER) {
         $USER = $ENV{LOGNAME};  # Some Unix (I think)
     }
-    if (!$USER) {
+    if(!$USER) {
         $USER = `whoami`;
         chomp $USER;
     }
-    if (!$USER) {
+    if(!$USER) {
         $USER = `id -un`;
         chomp $USER;
     }
@@ -370,7 +370,7 @@ sub startnew {
     }
 
     # Ugly hack but ssh client and gnutls-serv don't support pid files
-    if ($fakepidfile) {
+    if($fakepidfile) {
         if(open(my $out, ">", "$pidfile")) {
             print $out $child . "\n";
             close($out) || die "Failure writing pidfile";
@@ -381,7 +381,7 @@ sub startnew {
         }
         # could/should do a while connect fails sleep a bit and loop
         portable_sleep($timeout);
-        if (checkdied($child)) {
+        if(checkdied($child)) {
             logmsg "startnew: child process has failed to start\n" if($verbose);
             return (-1,-1);
         }
@@ -397,7 +397,7 @@ sub startnew {
             # similar!
             last;
         }
-        if (checkdied($child)) {
+        if(checkdied($child)) {
             logmsg "startnew: child process has died, server might start up\n"
                 if($verbose);
             # We can't just abort waiting for the server with a
@@ -1111,7 +1111,7 @@ sub runhttpserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1190,7 +1190,7 @@ sub runhttp2server {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0, 0);
     }
 
@@ -1251,7 +1251,7 @@ sub runhttp3server {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1317,7 +1317,7 @@ sub runhttpsserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1398,7 +1398,7 @@ sub runhttptlsserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1461,7 +1461,7 @@ sub runpingpongserver {
     my $portfile = $serverportfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0);
     }
 
@@ -1532,7 +1532,7 @@ sub runsecureserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1603,7 +1603,7 @@ sub runtftpserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1674,7 +1674,7 @@ sub rundnsserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1747,7 +1747,7 @@ sub runrtspserver {
     my $portfile = $serverportfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1817,7 +1817,7 @@ sub runsshserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -1935,7 +1935,7 @@ sub runmqttserver {
     my $portfile = $serverportfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0);
     }
 
@@ -1997,7 +1997,7 @@ sub runsocksserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -2080,7 +2080,7 @@ sub rundictserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -2141,7 +2141,7 @@ sub runsmbserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -2202,7 +2202,7 @@ sub runnegtelnetserver {
     my $pidfile = $serverpidfile{$server};
 
     # don't retry if the server doesn't work
-    if ($doesntrun{$pidfile}) {
+    if($doesntrun{$pidfile}) {
         return (2, 0, 0, 0);
     }
 
@@ -2387,7 +2387,7 @@ sub responsive_httptls_server {
     my $ip = "$HOSTIP";
     my $idnum = 1;
 
-    if ($ipvnum == 6) {
+    if($ipvnum == 6) {
         $port = protoport("httptls6");
         $ip = "$HOST6IP";
     }
@@ -3173,7 +3173,7 @@ sub subvariables {
     # this only works after the SSH server has been started
     # TODO: call sshversioninfo early and store $sshdid so this substitution
     # always works
-    if ($sshdid && $sshdid =~ /OpenSSH-Windows/) {
+    if($sshdid && $sshdid =~ /OpenSSH-Windows/) {
         $ssh_pwd = $file_pwd;
     }
 
index 4e0ca466c5f7b56508cb19a5fd686bf04a5f8ff4..98c15bc2a9b43e8339d65cda39f06fb1a32a657f 100755 (executable)
@@ -482,7 +482,7 @@ my $hstprvkeyf_config;
 my $pidfile_config;
 my $sftpsrv_config;
 my $sshdconfig_abs;
-if ($sshdid =~ /OpenSSH-Windows/) {
+if($sshdid =~ /OpenSSH-Windows/) {
     # Ensure to use native Windows paths with OpenSSH for Windows
     $clipubkeyf_config = pathhelp::sys_native_abs_path(pp($clipubkeyf));
     $hstprvkeyf_config = pathhelp::sys_native_abs_path(pp($hstprvkeyf));
@@ -490,7 +490,7 @@ if ($sshdid =~ /OpenSSH-Windows/) {
     $sftpsrv_config = pathhelp::sys_native_abs_path($sftpsrv);
     $sshdconfig_abs = pathhelp::sys_native_abs_path($sshdconfig);
 }
-elsif (pathhelp::os_is_win()) {
+elsif(pathhelp::os_is_win()) {
     # Ensure to use MinGW/Cygwin paths
     $clipubkeyf_config = pathhelp::build_sys_abs_path(pp($clipubkeyf));
     $hstprvkeyf_config = pathhelp::build_sys_abs_path(pp($hstprvkeyf));
@@ -599,10 +599,10 @@ push @cfgarr, '#';
 
 # AllowUsers and DenyUsers options should use lowercase on Windows
 # and do not support quotes around values for some unknown reason.
-if ($sshdid =~ /OpenSSH-Windows/) {
+if($sshdid =~ /OpenSSH-Windows/) {
     my $username_lc = lc $username;
     push @cfgarr, "AllowUsers " . $username_lc =~ s/ /\?/gr;
-    if (exists $ENV{USERDOMAIN}) {
+    if(exists $ENV{USERDOMAIN}) {
         my $userdomain_lc = lc $ENV{USERDOMAIN};
         $username_lc = "$userdomain_lc\\$username_lc";
         $username_lc =~ s/ /\?/g; # replace space with ?
@@ -617,7 +617,7 @@ if(!($sshdid =~ /OpenSSH/) || ($sshdvernum <= 590)) {
     push @cfgarr, "AuthorizedKeysFile2 $clipubkeyf_config";
 }
 push @cfgarr, "HostKey $hstprvkeyf_config";
-if ($sshdid !~ /OpenSSH-Windows/) {
+if($sshdid !~ /OpenSSH-Windows/) {
     push @cfgarr, "PidFile $pidfile_config";
     push @cfgarr, '#';
 }
@@ -884,12 +884,12 @@ if((! -e pp($knownhosts)) || (! -s pp($knownhosts))) {
 #
 my $identity_config;
 my $knownhosts_config;
-if ($sshdid =~ /OpenSSH-Windows/) {
+if($sshdid =~ /OpenSSH-Windows/) {
     # Ensure to use native Windows paths with OpenSSH for Windows
     $identity_config = pathhelp::sys_native_abs_path(pp($identity));
     $knownhosts_config = pathhelp::sys_native_abs_path(pp($knownhosts));
 }
-elsif (pathhelp::os_is_win()) {
+elsif(pathhelp::os_is_win()) {
     # Ensure to use MinGW/Cygwin paths
     $identity_config = pathhelp::build_sys_abs_path(pp($identity));
     $knownhosts_config = pathhelp::build_sys_abs_path(pp($knownhosts));
@@ -994,7 +994,7 @@ push @cfgarr, 'Protocol 2';
 push @cfgarr, '#';
 
 # BindAddress option is not supported by OpenSSH for Windows
-if (!($sshdid =~ /OpenSSH-Windows/)) {
+if(!($sshdid =~ /OpenSSH-Windows/)) {
     push @cfgarr, "BindAddress $listenaddr";
 }
 
@@ -1021,7 +1021,7 @@ push @cfgarr, 'PreferredAuthentications publickey';
 push @cfgarr, 'PubkeyAuthentication yes';
 
 # RSA authentication options are deprecated by newer OpenSSH
-if (!($sshid =~ /OpenSSH/) || ($sshvernum <= 730)) {
+if(!($sshid =~ /OpenSSH/) || ($sshvernum <= 730)) {
     push @cfgarr, 'RhostsRSAAuthentication no';
     push @cfgarr, 'RSAAuthentication no';
 }
@@ -1195,7 +1195,7 @@ logmsg "RUN: $cmd\n" if($verbose);
 #***************************************************************************
 # Start the ssh server daemon on Windows without forking it
 #
-if ($sshdid =~ /OpenSSH-Windows/) {
+if($sshdid =~ /OpenSSH-Windows/) {
     # Fake pidfile for ssh server on Windows.
     if(open(my $out, ">", "$pidfile")) {
         print $out $$ . "\n";
index f48d6029192f58de78be00101babcaeb097f147a..ed8247ce0c6d0646e9033a615e244da2f96e0404 100755 (executable)
@@ -43,7 +43,7 @@ my $rc = eval {
 };
 # Set default values if configure has not generated a configurehelp.pm file.
 # This is the case with cmake.
-if (!$rc) {
+if(!$rc) {
     $Cpreprocessor = 'cpp';
 }
 
@@ -67,8 +67,8 @@ my %rem;
 sub scanenum {
     my ($file) = @_;
     open my $h_in, "-|", "$Cpreprocessor $i$file" || die "Cannot preprocess $file";
-    while ( <$h_in> ) {
-        if ( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+    while( <$h_in> ) {
+        if( /enum\s+(\S+\s+)?{/ .. /}/ ) {
             s/^\s+//;
             next unless /^CURL/;
             chomp;
@@ -83,7 +83,7 @@ sub scanheader {
     my ($f)=@_;
     open my $h, "<", "$f";
     while(<$h>) {
-        if (/^#define ((LIB|)CURL[A-Za-z0-9_]*)/) {
+        if(/^#define ((LIB|)CURL[A-Za-z0-9_]*)/) {
             push @syms, $1;
         }
     }
index 103594e7967347e31eaf4e1d10f1d5b0bcfabd5b..0005c69309082f6c3f7bcee767d7981618d405cc 100755 (executable)
@@ -75,20 +75,20 @@ foreach my $f (@incs) {
     while(<H>) {
         s/CURL_DEPRECATED\(.*"\)//;
         s/  */ /g;
-        if (/^(^CURL_EXTERN .*?)\(/) {
+        if(/^(^CURL_EXTERN .*?)\(/) {
             my $decl = $1;
             $decl =~ s/\r$//;
             $decl =~ /([a-z_]+)$/;
             push(@out, "$1");
         }
-        elsif (/^(^CURL_EXTERN .*)/) {
+        elsif(/^(^CURL_EXTERN .*)/) {
             # handle two-line declarations
             my $decl = $1;
             $decl =~ s/\r$//;
             $first = $decl;
         }
         elsif($first) {
-            if (/^ *(.*)\(/) {
+            if(/^ *(.*)\(/) {
                 my $decl = $1;
                 $decl =~ s/\r$//;
                 $first .= $decl;
index 875f8c8b48965420c1f9663b5b933fd8b07797f4..f38d211cce93e2ebfa6b31aed2c314ffb6e4c550 100755 (executable)
@@ -43,7 +43,7 @@ my $rc = eval {
 };
 # Set default values if configure has not generated a configurehelp.pm file.
 # This is the case with cmake.
-if (!$rc) {
+if(!$rc) {
     $Cpreprocessor = 'cpp';
 }
 
@@ -74,7 +74,7 @@ sub scanenums {
 
     open H_IN, "-|", "$Cpreprocessor -DCURL_DISABLE_DEPRECATION $i$file" ||
         die "Cannot preprocess $file";
-    while ( <H_IN> ) {
+    while(<H_IN>) {
         my ($line, $linenum) = ($_, $.);
         if( /^#(line|) (\d+) \"(.*)\"/) {
             # if the included file isn't in our incdir, then we skip this section
@@ -91,10 +91,10 @@ sub scanenums {
         if($skipit) {
             next;
         }
-        if (/^#/) {
+        if(/^#/) {
             next;
         }
-        if ( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+        if( /enum\s+(\S+\s+)?{/ .. /}/ ) {
             s/^\s+//;
             chomp;
             s/[,\s].*//;
@@ -122,7 +122,7 @@ sub scanheader {
     open H, "<$f";
     while(<H>) {
         my ($line, $linenum) = ($_, $.);
-        if (/^ *# *define +([^ \n]*)/) {
+        if(/^ *# *define +([^ \n]*)/) {
             if($verbose) {
                 print "Source: $f\n";
                 print "Symbol: $1\n";
index 4957d305c121619f3fa60381aef1452b634313ae..7038f58696e25f767745548aa3a2f92b0ae6f0d9 100755 (executable)
@@ -43,7 +43,7 @@ my $rc = eval {
 };
 # Set default values if configure has not generated a configurehelp.pm file.
 # This is the case with cmake.
-if (!$rc) {
+if(!$rc) {
     $Cpreprocessor = 'cpp';
 }
 
index 6a96435a9fead48791d122b02a4d9a96e6fc50cc..514bf1cab44e4bea2e829d2d45db25b184595771 100755 (executable)
@@ -261,9 +261,9 @@ if($name && $email && $desc) {
     $infixed=4;
     $fixed=4;
 }
-elsif (open(my $f, "<", "$setupfile")) {
-    while (<$f>) {
-        if (/(\w+)=(.*)/) {
+elsif(open(my $f, "<", "$setupfile")) {
+    while(<$f>) {
+        if(/(\w+)=(.*)/) {
             eval "\$$1=$2;";
         }
     }
@@ -296,7 +296,7 @@ if(!$desc) {
 }
 
 if(!$confopts) {
-    if ($infixed < 4) {
+    if($infixed < 4) {
         print "please enter your additional arguments to configure\n";
         print "examples: --with-openssl --enable-debug --enable-ipv6\n";
         $confopts = <>;
@@ -372,7 +372,7 @@ if(-d $CURLDIR) {
         unlink "$CURLDIR/src/tool_hugehelp.c";
         # find out if curl source dir has an in-tree c-ares repo
         $have_embedded_ares = 1 if (-f "$CURLDIR/ares/GIT-INFO");
-    } elsif (!$git && -f "$CURLDIR/tests/testcurl.pl") {
+    } elsif(!$git && -f "$CURLDIR/tests/testcurl.pl") {
         logit "$CURLDIR is verified to be a fine daily source dir";
         # find out if curl source dir has an in-tree c-ares extracted tarball
         $have_embedded_ares = 1 if (-f "$CURLDIR/ares/ares_build.h");
@@ -499,7 +499,7 @@ if($git) {
 # Set timestamp to the one in curlver.h if this isn't a git test build.
 if((-f "include/curl/curlver.h") &&
     (open(my $f, "<", "include/curl/curlver.h"))) {
-    while (<$f>) {
+    while(<$f>) {
         chomp;
         if($_ =~ /^\#define\s+LIBCURL_TIMESTAMP\s+\"(.+)\".*$/) {
             my $stampstring = $1;
@@ -516,8 +516,8 @@ if((-f "include/curl/curlver.h") &&
 # Show timestamp we are using for this test build.
 logit "timestamp = $timestamp";
 
-if ($configurebuild) {
-    if (-f "configure") {
+if($configurebuild) {
+    if(-f "configure") {
         logit "configure created (at least it exists)";
     } else {
         mydie "no configure created/found";
@@ -620,7 +620,7 @@ if(($have_embedded_ares) &&
     $confheader =~ s/curl/ares/;
     logit_spaced "display ares/$confheader";
     if(open($f, "<", "ares/$confheader")) {
-        while (<$f>) {
+        while(<$f>) {
             print if /^ *#/;
         }
         close($f);
@@ -657,27 +657,27 @@ if(($have_embedded_ares) &&
 my $mkcmd = "$make -i" . ($targetos && !$configurebuild ? " $targetos" : "");
 logit "$mkcmd";
 open(my $f, "-|", "$mkcmd 2>&1") or die;
-while (<$f>) {
+while(<$f>) {
     s/$pwd//g;
     print;
 }
 close($f);
 
-if (-f "lib/libcurl$libext") {
+if(-f "lib/libcurl$libext") {
     logit "libcurl was created fine (libcurl$libext)";
 }
 else {
     mydie "libcurl was not created (libcurl$libext)";
 }
 
-if (-f "src/curl$binext") {
+if(-f "src/curl$binext") {
     logit "curl was created fine (curl$binext)";
 }
 else {
     mydie "curl was not created (curl$binext)";
 }
 
-if (!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
+if(!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
     logit "display curl${binext} --version output";
     my $cmd = ($extvercmd ne '' ? $extvercmd.' ' : '')."./src/curl${binext} --version|";
     open($f, "<", $cmd);
@@ -700,7 +700,7 @@ if($configurebuild && !$crosscompile) {
         logit_spaced "build examples";
         open($f, "-|", "$make -i 2>&1") or die;
         open(my $log, ">", "$buildlog") or die;
-        while (<$f>) {
+        while(<$f>) {
             s/$pwd//g;
             print;
             print $log $_;
@@ -747,7 +747,7 @@ else {
             logit_spaced "build examples";
             open($f, "-|", "$make -i 2>&1") or die;
             open(my $log, ">", "$buildlog") or die;
-            while (<$f>) {
+            while(<$f>) {
                 s/$pwd//g;
                 print;
                 print $log $_;
@@ -762,7 +762,7 @@ else {
             logit_spaced "build test harness";
             open(my $f, "-|", "$make -i 2>&1") or die;
             open(my $log, ">", "$buildlog") or die;
-            while (<$f>) {
+            while(<$f>) {
                 s/$pwd//g;
                 print;
                 print $log $_;
index 47054627fc99990b99419c0c3bf6f59d3331f260..d1cf0c6b341af806917dce0c1105304742beab1d 100644 (file)
@@ -247,7 +247,7 @@ sub subsha256base64file {
     my ($thing) = @_;
 
     # SHA-256 base64
-    while ($$thing =~ s/%sha256b64file\[(.*?)\]sha256b64file%/%%SHA256B64FILE%%/i) {
+    while($$thing =~ s/%sha256b64file\[(.*?)\]sha256b64file%/%%SHA256B64FILE%%/i) {
         my $file_path = $1;
         $file_path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
         my $hash_b64 = get_sha256_base64($file_path);
@@ -268,7 +268,7 @@ sub substrippemfile {
     my ($thing) = @_;
 
     # File content substitution
-    while ($$thing =~ s/%strippemfile\[(.*?)\]strippemfile%/%%FILE%%/i) {
+    while($$thing =~ s/%strippemfile\[(.*?)\]strippemfile%/%%FILE%%/i) {
         my $file_path = $1;
         $file_path =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
         my $file_content = get_file_content($file_path);