From 1b48c6148a0708f401e2cef8aaee445ffb689ea9 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Sat, 25 Oct 2025 23:32:14 +0200 Subject: [PATCH] tidy-up: miscellaneous - schannel: delete superfluous parenthesis. - tftp: delete stray space from log output. - ws: update guard comment. - docs/examples: constify variables. - runtests/servers: enclose unknown parameter between quotes. - scripts/perlcheck.sh: drop redundant grep `-E` option. - THANKS: move names from comments to THANKS. - sync `--depth` option style across scripts. - sync git repo URL ending between some scripts. - BINDINGS.md: drop protocol from archive.org URL path. - whitespace, indent, unfold lines. Closes #19565 --- .github/workflows/http3-linux.yml | 20 ++++++++++---------- .github/workflows/linux.yml | 2 +- CMakeLists.txt | 13 ++++++------- docs/BINDINGS.md | 2 +- docs/HTTP3.md | 2 +- docs/THANKS | 4 +++- docs/examples/crawler.c | 2 +- docs/examples/ftpuploadfrommem.c | 2 +- docs/examples/ftpuploadresume.c | 2 +- docs/examples/ghiper.c | 4 ++-- docs/examples/headerapi.c | 2 +- docs/examples/http2-upload.c | 2 +- docs/examples/multi-debugcallback.c | 2 +- lib/cf-socket.c | 24 ++++++++---------------- lib/curl_ntlm_core.c | 6 +++--- lib/parsedate.c | 2 +- lib/tftp.c | 4 ++-- lib/vtls/rustls.c | 2 +- lib/vtls/schannel.c | 4 ++-- lib/ws.c | 2 +- scripts/mk-ca-bundle.pl | 2 +- scripts/perlcheck.sh | 2 +- tests/ech_combos.py | 8 +++----- tests/ftpserver.pl | 2 +- tests/getpart.pm | 2 +- tests/http-server.pl | 2 +- tests/http2-server.pl | 2 +- tests/http3-server.pl | 2 +- tests/rtspserver.pl | 2 +- tests/secureserver.pl | 2 +- tests/sshserver.pl | 2 +- tests/tftpserver.pl | 2 +- 32 files changed, 62 insertions(+), 71 deletions(-) diff --git a/.github/workflows/http3-linux.yml b/.github/workflows/http3-linux.yml index a844eb6c14..2979e9d7d1 100644 --- a/.github/workflows/http3-linux.yml +++ b/.github/workflows/http3-linux.yml @@ -189,7 +189,7 @@ jobs: if: ${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl + git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl cd openssl ./config --prefix="$PWD"/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated make @@ -232,7 +232,7 @@ jobs: if: ${{ steps.cache-gnutls.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "${GNUTLS_VERSION}" https://github.com/gnutls/gnutls.git + git clone --quiet --depth 1 -b "${GNUTLS_VERSION}" https://github.com/gnutls/gnutls cd gnutls # required: nettle-dev libp11-kit-dev libev-dev autopoint bison gperf gtk-doc-tools libtasn1-bin ./bootstrap @@ -247,7 +247,7 @@ jobs: if: ${{ steps.cache-wolfssl.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl.git + git clone --quiet --depth 1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl cd wolfssl ./autogen.sh ./configure --disable-dependency-tracking --enable-all --enable-quic \ @@ -259,9 +259,9 @@ jobs: if: ${{ steps.cache-nghttp3.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3 + git clone --quiet --depth 1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3 cd nghttp3 - git submodule update --init --depth=1 + git submodule update --init --depth 1 autoreconf -fi ./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only make @@ -272,7 +272,7 @@ jobs: # building twice to get crypto libs for ossl, libressl and awslc installed run: | cd ~ - git clone --quiet --depth=1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 + git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 cd ngtcp2 autoreconf -fi ./configure --disable-dependency-tracking --prefix="$PWD"/build \ @@ -290,7 +290,7 @@ jobs: if: ${{ steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl + git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl cd ngtcp2-boringssl autoreconf -fi ./configure --disable-dependency-tracking --prefix="$PWD"/build \ @@ -303,9 +303,9 @@ jobs: if: ${{ steps.cache-nghttp2.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2 + git clone --quiet --depth 1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2 cd nghttp2 - git submodule update --init --depth=1 + git submodule update --init --depth 1 autoreconf -fi # required (for nghttpx application): libc-ares-dev libev-dev zlib1g-dev # optional (for nghttpx application): libbrotli-dev @@ -578,7 +578,7 @@ jobs: if: ${{ matrix.build.name == 'quiche' && steps.cache-quiche.outputs.cache-hit != 'true' }} run: | cd ~ - git clone --quiet --depth=1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche.git + git clone --quiet --depth 1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche cd quiche #### Work-around https://github.com/curl/curl/issues/7927 ####### #### See https://github.com/alexcrichton/cmake-rs/issues/131 #### diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 90376ac505..4cea194c76 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -580,7 +580,7 @@ jobs: - name: 'build openssl (thread sanitizer)' if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') && steps.cache-openssl-tsan.outputs.cache-hit != 'true' }} run: | - git clone --quiet --depth=1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl + git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl cd openssl CC=clang CFLAGS='-fsanitize=thread' LDFLAGS='-fsanitize=thread' ./config --prefix=/home/runner/openssl --libdir=lib no-makedepend no-apps no-docs no-tests make diff --git a/CMakeLists.txt b/CMakeLists.txt index 8876b5e636..30cb5f398e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,6 @@ # SPDX-License-Identifier: curl # ########################################################################### -# by Tetetest and Sukender (Benoit Neil) cmake_minimum_required(VERSION 3.7...3.16 FATAL_ERROR) message(STATUS "Using CMake version ${CMAKE_VERSION}") @@ -1741,9 +1740,9 @@ check_function_exists("eventfd" HAVE_EVENTFD) check_symbol_exists("ftruncate" "unistd.h" HAVE_FTRUNCATE) check_symbol_exists("getpeername" "${CURL_INCLUDES}" HAVE_GETPEERNAME) # winsock2.h unistd.h proto/bsdsocket.h check_symbol_exists("getsockname" "${CURL_INCLUDES}" HAVE_GETSOCKNAME) # winsock2.h unistd.h proto/bsdsocket.h -check_function_exists("getrlimit" HAVE_GETRLIMIT) -check_function_exists("setlocale" HAVE_SETLOCALE) -check_function_exists("setrlimit" HAVE_SETRLIMIT) +check_function_exists("getrlimit" HAVE_GETRLIMIT) +check_function_exists("setlocale" HAVE_SETLOCALE) +check_function_exists("setrlimit" HAVE_SETRLIMIT) if(WIN32) # include wincrypt.h as a workaround for mingw-w64 __MINGW64_VERSION_MAJOR <= 5 header bug */ @@ -1752,9 +1751,9 @@ else() check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h check_function_exists("realpath" HAVE_REALPATH) check_function_exists("sched_yield" HAVE_SCHED_YIELD) - check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP) - check_symbol_exists("stricmp" "string.h" HAVE_STRICMP) - check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI) + check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP) + check_symbol_exists("stricmp" "string.h" HAVE_STRICMP) + check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI) endif() check_function_exists("setmode" HAVE_SETMODE) diff --git a/docs/BINDINGS.md b/docs/BINDINGS.md index 9ddbde5c42..065126efd7 100644 --- a/docs/BINDINGS.md +++ b/docs/BINDINGS.md @@ -61,7 +61,7 @@ Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang [Haskell](https://hackage.haskell.org/package/curl) Written by Galois, Inc -[Hollywood](https://web.archive.org/web/20250116185836/https://www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn +[Hollywood](https://web.archive.org/web/20250116185836/www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn [Java](https://github.com/covers1624/curl4j) diff --git a/docs/HTTP3.md b/docs/HTTP3.md index b3ddcbaaf8..def30798ec 100644 --- a/docs/HTTP3.md +++ b/docs/HTTP3.md @@ -54,7 +54,7 @@ versions do not work. Build OpenSSL (version 3.5.0 or newer): - % git clone --quiet --depth=1 -b openssl-$OPENSSL_VERSION https://github.com/openssl/openssl + % git clone --depth 1 -b openssl-$OPENSSL_VERSION https://github.com/openssl/openssl % cd openssl % ./config --prefix= --libdir=lib % make diff --git a/docs/THANKS b/docs/THANKS index fd4015468e..d3b3efc0f1 100644 --- a/docs/THANKS +++ b/docs/THANKS @@ -361,7 +361,7 @@ Benjamin Sergeant Ben Kohler Ben Madsen Ben Noordhuis -Benoit Neil +Benoit Neil (Sukender) Benoit Pierre Benoit Sigoure Ben Van Hof @@ -3148,6 +3148,7 @@ Temprimus Terence Eden Terri Oda Terry Wu +Tetetest thanhchungbtc on github TheAssassin on github TheBitBrine @@ -3328,6 +3329,7 @@ UrsusArctos on github User Sg ustcqidi on github Vadim Grinshpun +Vaibhav Kumar Valentin David Valentín Gutiérrez Valentin Richter diff --git a/docs/examples/crawler.c b/docs/examples/crawler.c index 4812a67d14..bda931eb13 100644 --- a/docs/examples/crawler.c +++ b/docs/examples/crawler.c @@ -170,7 +170,7 @@ static size_t follow_links(CURLM *multi, struct memory *mem, return count; } -static int is_html(char *ctype) +static int is_html(const char *ctype) { return ctype != NULL && strlen(ctype) > 10 && strstr(ctype, "text/html"); } diff --git a/docs/examples/ftpuploadfrommem.c b/docs/examples/ftpuploadfrommem.c index 3ae71fa4ab..9baf538b99 100644 --- a/docs/examples/ftpuploadfrommem.c +++ b/docs/examples/ftpuploadfrommem.c @@ -48,7 +48,7 @@ struct WriteThis { static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *userp) { struct WriteThis *upload = (struct WriteThis *)userp; - size_t max = size*nmemb; + size_t max = size * nmemb; if(max < 1) return 0; diff --git a/docs/examples/ftpuploadresume.c b/docs/examples/ftpuploadresume.c index e9d723d70d..b86c23ab86 100644 --- a/docs/examples/ftpuploadresume.c +++ b/docs/examples/ftpuploadresume.c @@ -39,7 +39,7 @@ static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb, r = sscanf(ptr, "Content-Length: %ld\n", &len); if(r == 1) - *((long *) stream) = len; + *((long *)stream) = len; return size * nmemb; } diff --git a/docs/examples/ghiper.c b/docs/examples/ghiper.c index 45c129faea..b9edb517d3 100644 --- a/docs/examples/ghiper.c +++ b/docs/examples/ghiper.c @@ -430,9 +430,9 @@ int init_fifo(void) int main(void) { struct GlobalInfo *g = g_malloc0(sizeof(struct GlobalInfo)); - GMainLoop*gmain; + GMainLoop *gmain; int fd; - GIOChannel* ch; + GIOChannel *ch; CURLcode res = curl_global_init(CURL_GLOBAL_ALL); if(res) diff --git a/docs/examples/headerapi.c b/docs/examples/headerapi.c index 428374bac6..18588cf33f 100644 --- a/docs/examples/headerapi.c +++ b/docs/examples/headerapi.c @@ -33,7 +33,7 @@ static size_t write_cb(char *data, size_t n, size_t l, void *userp) /* take care of the data here, ignored in this example */ (void)data; (void)userp; - return n*l; + return n * l; } int main(void) diff --git a/docs/examples/http2-upload.c b/docs/examples/http2-upload.c index 84b0e18ea1..0365d93bc5 100644 --- a/docs/examples/http2-upload.c +++ b/docs/examples/http2-upload.c @@ -88,7 +88,7 @@ struct input { int num; }; -static void dump(const char *text, int num, unsigned char *ptr, +static void dump(const char *text, int num, const unsigned char *ptr, size_t size, char nohex) { size_t i; diff --git a/docs/examples/multi-debugcallback.c b/docs/examples/multi-debugcallback.c index d838feed40..52f00ce482 100644 --- a/docs/examples/multi-debugcallback.c +++ b/docs/examples/multi-debugcallback.c @@ -34,7 +34,7 @@ #define TRUE 1 -static void dump(const char *text, FILE *stream, unsigned char *ptr, +static void dump(const char *text, FILE *stream, const unsigned char *ptr, size_t size, char nohex) { size_t i; diff --git a/lib/cf-socket.c b/lib/cf-socket.c index 8661647ba5..80ed212721 100644 --- a/lib/cf-socket.c +++ b/lib/cf-socket.c @@ -171,8 +171,7 @@ tcpkeepalive(struct Curl_cfilter *cf, if(setsockopt(sockfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set SO_KEEPALIVE on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } else { #ifdef USE_WINSOCK @@ -187,22 +186,19 @@ tcpkeepalive(struct Curl_cfilter *cf, if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, (const char *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } optval = curlx_sltosi(data->set.tcp_keepintvl); if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL, (const char *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } optval = curlx_sltosi(data->set.tcp_keepcnt); if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPCNT, (const char *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPCNT on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } } else @@ -239,8 +235,7 @@ tcpkeepalive(struct Curl_cfilter *cf, if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPIDLE, (void *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPIDLE on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } #elif defined(TCP_KEEPALIVE) /* macOS style */ @@ -249,8 +244,7 @@ tcpkeepalive(struct Curl_cfilter *cf, if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE, (void *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } #elif defined(TCP_KEEPALIVE_THRESHOLD) /* Solaris <11.4 style */ @@ -259,8 +253,7 @@ tcpkeepalive(struct Curl_cfilter *cf, if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPALIVE_THRESHOLD, (void *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPALIVE_THRESHOLD on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } #endif #ifdef TCP_KEEPINTVL @@ -269,8 +262,7 @@ tcpkeepalive(struct Curl_cfilter *cf, if(setsockopt(sockfd, IPPROTO_TCP, TCP_KEEPINTVL, (void *)&optval, sizeof(optval)) < 0) { CURL_TRC_CF(data, cf, "Failed to set TCP_KEEPINTVL on fd " - "%" FMT_SOCKET_T ": errno %d", - sockfd, SOCKERRNO); + "%" FMT_SOCKET_T ": errno %d", sockfd, SOCKERRNO); } #elif defined(TCP_KEEPALIVE_ABORT_THRESHOLD) /* Solaris <11.4 style */ diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c index 28ae16d187..d013929d4d 100644 --- a/lib/curl_ntlm_core.c +++ b/lib/curl_ntlm_core.c @@ -469,13 +469,13 @@ static void time2filetime(struct ms_filetime *ft, time_t t) { #if SIZEOF_TIME_T > 4 t = (t + (curl_off_t)11644473600) * 10000000; - ft->dwLowDateTime = (unsigned int) (t & 0xFFFFFFFF); - ft->dwHighDateTime = (unsigned int) (t >> 32); + ft->dwLowDateTime = (unsigned int)(t & 0xFFFFFFFF); + ft->dwHighDateTime = (unsigned int)(t >> 32); #else unsigned int r, s; unsigned int i; - ft->dwLowDateTime = (unsigned int)t & 0xFFFFFFFF; + ft->dwLowDateTime = (unsigned int)(t & 0xFFFFFFFF); ft->dwHighDateTime = 0; # ifndef HAVE_TIME_T_UNSIGNED diff --git a/lib/parsedate.c b/lib/parsedate.c index 3fa5919c05..2c3eb67fd2 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -286,7 +286,7 @@ enum assume { static time_t time2epoch(int sec, int min, int hour, int mday, int mon, int year) { - static const int month_days_cumulative [12] = + static const int month_days_cumulative[12] = { 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334 }; int leap_days = year - (mon <= 1); leap_days = ((leap_days / 4) - (leap_days / 100) + (leap_days / 400) diff --git a/lib/tftp.c b/lib/tftp.c index 91a8c25ff3..c730f8499e 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -241,7 +241,7 @@ static CURLcode tftp_set_timeouts(struct tftp_conn *state) state->retry_time = 1; infof(state->data, - "set timeouts for state %d; Total % " FMT_OFF_T ", retry %d maxtry %d", + "set timeouts for state %d; Total %" FMT_OFF_T ", retry %d maxtry %d", (int)state->state, timeout_ms, state->retry_time, state->retry_max); /* init RX time */ @@ -381,7 +381,7 @@ static CURLcode tftp_parse_option_ack(struct tftp_conn *state, static CURLcode tftp_option_add(struct tftp_conn *state, size_t *csize, char *buf, const char *option) { - if(( strlen(option) + *csize + 1) > (size_t)state->blksize) + if((strlen(option) + *csize + 1) > (size_t)state->blksize) return CURLE_TFTP_ILLEGAL; strcpy(buf, option); *csize += strlen(option) + 1; diff --git a/lib/vtls/rustls.c b/lib/vtls/rustls.c index f5e3288316..3b5bea2c6f 100644 --- a/lib/vtls/rustls.c +++ b/lib/vtls/rustls.c @@ -494,7 +494,7 @@ add_ciphers: for(j = 0; j < default_len; j++) { entry = rustls_default_crypto_provider_ciphersuites_get(j); if(rustls_supported_ciphersuite_protocol_version(entry) == - RUSTLS_TLS_VERSION_TLSV1_3) + RUSTLS_TLS_VERSION_TLSV1_3) continue; /* No duplicates allowed (so selected cannot overflow) */ diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 6311f4a416..a40c440234 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -566,8 +566,8 @@ schannel_acquire_credential_handle(struct Curl_cfilter *cf, } } - if((fInCert || blob) && (data->set.ssl.cert_type) && - (!curl_strequal(data->set.ssl.cert_type, "P12"))) { + if((fInCert || blob) && data->set.ssl.cert_type && + !curl_strequal(data->set.ssl.cert_type, "P12")) { failf(data, "schannel: certificate format compatibility error " " for %s", blob ? "(memory blob)" : data->set.ssl.primary.clientcert); diff --git a/lib/ws.c b/lib/ws.c index 5a61c65aa8..140bdece47 100644 --- a/lib/ws.c +++ b/lib/ws.c @@ -2016,4 +2016,4 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl, return CURLE_NOT_BUILT_IN; } -#endif /* !CURL_DISABLE_WEBSOCKETS */ +#endif /* !CURL_DISABLE_WEBSOCKETS && !CURL_DISABLE_HTTP */ diff --git a/scripts/mk-ca-bundle.pl b/scripts/mk-ca-bundle.pl index d4b5418e0c..71880653b2 100755 --- a/scripts/mk-ca-bundle.pl +++ b/scripts/mk-ca-bundle.pl @@ -357,7 +357,7 @@ if(!$opt_n) { report "LWP is not available (LWP::UserAgent not found)"; exit 1; } - my $ua = new LWP::UserAgent(agent => "$0/$version"); + my $ua = new LWP::UserAgent(agent => "$0/$version"); $ua->env_proxy(); $resp = $ua->mirror($url, $txt); if($resp && $resp->code eq '304') { diff --git a/scripts/perlcheck.sh b/scripts/perlcheck.sh index 7ec23983d5..9e3c87f695 100755 --- a/scripts/perlcheck.sh +++ b/scripts/perlcheck.sh @@ -42,7 +42,7 @@ echo "parallel: ${procs}" elif git rev-parse --is-inside-work-tree >/dev/null 2>&1; then { git ls-files | grep -E '\.(pl|pm)$' - git grep -l -E '^#!/usr/bin/env perl' + git grep -l '^#!/usr/bin/env perl' } | sort -u else # strip off the leading ./ to make the grep regexes work properly diff --git a/tests/ech_combos.py b/tests/ech_combos.py index 66daaa373d..4eba4de1c2 100755 --- a/tests/ech_combos.py +++ b/tests/ech_combos.py @@ -31,7 +31,7 @@ # ECH command line args def CombinationRepetitionUtil(chosen, arr, badarr, index, - r, start, end): + r, start, end): # Current combination is ready, # print it @@ -68,9 +68,9 @@ def CombinationRepetitionUtil(chosen, arr, badarr, index, # with next (Note that i+1 is passed, # but index is not changed) CombinationRepetitionUtil(chosen, arr, badarr, index + 1, - r, start, end) + r, start, end) CombinationRepetitionUtil(chosen, arr, badarr, index, - r, start + 1, end) + r, start + 1, end) # The main function that prints all # combinations of size r in arr[] of @@ -94,5 +94,3 @@ r = 8 n = len(arr) - 1 CombinationRepetition(arr, badarr, n, r) - -# This code is contributed by Vaibhav Kumar 12. diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index 10ac7c7c14..0ca3ac5281 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -3044,7 +3044,7 @@ while(@ARGV) { } } else { - print STDERR "\nWarning: ftpserver.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: ftpserver.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/getpart.pm b/tests/getpart.pm index c9382ad7f2..ba611d761f 100644 --- a/tests/getpart.pm +++ b/tests/getpart.pm @@ -398,7 +398,7 @@ sub writearray { my ($filename, $arrayref)=@_; open(my $temp, ">", "$filename") || die "Failure writing file"; - binmode($temp,":raw"); # Cygwin fix by Kevin Roth + binmode($temp,":raw"); # Cygwin fix for(@$arrayref) { print $temp $_; } diff --git a/tests/http-server.pl b/tests/http-server.pl index d100caef68..006b6f3817 100755 --- a/tests/http-server.pl +++ b/tests/http-server.pl @@ -140,7 +140,7 @@ while(@ARGV) { $verbose = 1; } else { - print STDERR "\nWarning: http-server.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: http-server.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/http2-server.pl b/tests/http2-server.pl index 73dbf62e40..3ab38803f1 100755 --- a/tests/http2-server.pl +++ b/tests/http2-server.pl @@ -102,7 +102,7 @@ while(@ARGV) { } } elsif($ARGV[0]) { - print STDERR "\nWarning: http2-server.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: http2-server.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/http3-server.pl b/tests/http3-server.pl index b7f9dd3009..13cc49a9df 100755 --- a/tests/http3-server.pl +++ b/tests/http3-server.pl @@ -102,7 +102,7 @@ while(@ARGV) { } } else { - print STDERR "\nWarning: http3-server.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: http3-server.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/rtspserver.pl b/tests/rtspserver.pl index d2e1339073..d23ed7e637 100755 --- a/tests/rtspserver.pl +++ b/tests/rtspserver.pl @@ -104,7 +104,7 @@ while(@ARGV) { $verbose = 1; } else { - print STDERR "\nWarning: rtspserver.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: rtspserver.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/secureserver.pl b/tests/secureserver.pl index a773a86b86..0e34bf1d7c 100755 --- a/tests/secureserver.pl +++ b/tests/secureserver.pl @@ -176,7 +176,7 @@ while(@ARGV) { $mtls = 1; } else { - print STDERR "\nWarning: secureserver.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: secureserver.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/sshserver.pl b/tests/sshserver.pl index 20aceebc24..ae1a2579f2 100755 --- a/tests/sshserver.pl +++ b/tests/sshserver.pl @@ -191,7 +191,7 @@ while(@ARGV) { } } else { - print STDERR "\nWarning: sshserver.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: sshserver.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } diff --git a/tests/tftpserver.pl b/tests/tftpserver.pl index 862d21cd13..bb96bb743e 100755 --- a/tests/tftpserver.pl +++ b/tests/tftpserver.pl @@ -104,7 +104,7 @@ while(@ARGV) { $verbose = 1; } else { - print STDERR "\nWarning: tftpserver.pl unknown parameter: $ARGV[0]\n"; + print STDERR "\nWarning: tftpserver.pl unknown parameter: '$ARGV[0]'\n"; } shift @ARGV; } -- 2.47.3