From 397b8f0ec6758dcc743f8b224fa9202f4bac931a Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Mon, 15 Jun 2026 14:33:20 +0200 Subject: [PATCH] tidy-up: docs, comments, typos, whitespace - GHA/windows: mention `IgnoreStandardErrorWarningFormat=true` in comment. - cmake: fix MIT/GNU GSS order in messages. - drop some exclamation marks from messages. - drop redundant ending newlines from messages. - fold/unfold where possible. - fix indent, whitespace, typos and other nits. Closes #22185 --- .github/workflows/windows.yml | 2 ++ CMake/FindGSS.cmake | 4 +-- CMakeLists.txt | 15 ++++---- acinclude.m4 | 2 +- configure.ac | 3 +- docs/HTTP3.md | 3 +- docs/INSTALL-CMAKE.md | 33 ++++++++++++------ docs/INSTALL.md | 12 +++---- docs/MANUAL.md | 4 +-- docs/RELEASE-PROCEDURE.md | 2 +- docs/cmdline-opts/Makefile.am | 6 ++-- docs/cmdline-opts/_URL.md | 8 ++--- docs/examples/http2-serverpush.c | 2 +- docs/libcurl/curl_formadd.md | 4 +-- docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.md | 2 +- lib/creds.h | 4 +-- lib/curl_addrinfo.c | 14 ++++---- lib/curl_setup.h | 6 ++-- lib/formdata.c | 2 +- lib/http_aws_sigv4.c | 2 +- lib/if2ip.c | 18 +++++----- lib/socks_sspi.c | 2 +- lib/transfer.c | 2 +- lib/url.c | 2 +- lib/urlapi.c | 2 +- lib/urldata.h | 2 +- lib/vtls/openssl.h | 2 +- m4/curl-apple-sectrust.m4 | 1 - m4/curl-compilers.m4 | 16 ++++----- m4/curl-confopts.m4 | 2 +- m4/curl-functions.m4 | 38 ++++++++++----------- m4/curl-reentrant.m4 | 4 +-- scripts/cd2nroff | 4 +-- src/tool_getparam.c | 2 +- tests/data/Makefile.am | 3 +- tests/ftpserver.pl | 2 +- tests/http/test_32_ftps_vsftpd.py | 4 +-- tests/libtest/lib668.c | 4 +-- tests/runtests.pl | 20 +++++------ tests/server/dnsd.c | 2 +- tests/server/rtspd.c | 2 +- tests/server/sws.c | 10 +++--- tests/server/tftpd.c | 2 +- tests/server/util.c | 9 ++--- tests/test1139.pl | 6 ++-- tests/test1140.pl | 2 +- tests/unit/unit2413.c | 14 ++++---- 47 files changed, 157 insertions(+), 150 deletions(-) diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 53429d1f2b..96cfecde26 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -1031,6 +1031,8 @@ jobs: # Officially this requires the vcvarsall.bat MS-DOS batch file (as of # VS2022). Since it integrates badly with CI steps and shell scripts, # reproduce the necessary build configuration manually, without envs. + # The option is likely called: IgnoreStandardErrorWarningFormat=true, + # but there seems to be no option to pass it via CMake or CLI. MSVC_EDITION='2022/Enterprise/vc/tools/msvc' [[ "${MATRIX_IMAGE}" = *'windows-2025'* ]] && MSVC_EDITION='18/Enterprise/vc/tools/msvc' [[ "$(uname -s)" = *'ARM64'* ]] && MSVC_HOST='arm64' || MSVC_HOST='x64' # x86 diff --git a/CMake/FindGSS.cmake b/CMake/FindGSS.cmake index 6f352b2e4f..a49d529d81 100644 --- a/CMake/FindGSS.cmake +++ b/CMake/FindGSS.cmake @@ -189,7 +189,7 @@ if(NOT _gss_FOUND) # Not found by pkg-config. Let us take more traditional appr endif() endif() if(NOT _gss_flavor) - message(FATAL_ERROR "GNU or MIT GSS is required") + message(FATAL_ERROR "MIT or GNU GSS is required") endif() else() if(_gss_MODULE_NAME STREQUAL _gnu_modname) @@ -199,7 +199,7 @@ else() set(_gss_flavor "MIT") set(_gss_pc_requires ${_mit_modname}) else() - message(FATAL_ERROR "GNU or MIT GSS is required") + message(FATAL_ERROR "MIT or GNU GSS is required") endif() message(STATUS "Found GSS/${_gss_flavor} (via pkg-config): ${_gss_INCLUDE_DIRS} (found version \"${_gss_version}\")") endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index c956dc4115..9b0d974daa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1813,7 +1813,8 @@ if(NOT CMAKE_CROSSCOMPILING) include(CheckCSourceRuns) check_c_source_runs(" #include - int main(void) { + int main(void) + { time_t t = -1; return t < 0; }" HAVE_TIME_T_UNSIGNED) @@ -2087,12 +2088,12 @@ message(STATUS "Features: ${SUPPORT_FEATURES}") # Clear list and collect SSL backends set(_items "") -curl_add_if("Schannel" _ssl_enabled AND USE_SCHANNEL) -curl_add_if("${_openssl}" _ssl_enabled AND USE_OPENSSL) -curl_add_if("mbedTLS" _ssl_enabled AND USE_MBEDTLS) -curl_add_if("wolfSSL" _ssl_enabled AND USE_WOLFSSL) -curl_add_if("GnuTLS" _ssl_enabled AND USE_GNUTLS) -curl_add_if("Rustls" _ssl_enabled AND USE_RUSTLS) +curl_add_if("Schannel" _ssl_enabled AND USE_SCHANNEL) +curl_add_if("${_openssl}" _ssl_enabled AND USE_OPENSSL) +curl_add_if("mbedTLS" _ssl_enabled AND USE_MBEDTLS) +curl_add_if("wolfSSL" _ssl_enabled AND USE_WOLFSSL) +curl_add_if("GnuTLS" _ssl_enabled AND USE_GNUTLS) +curl_add_if("Rustls" _ssl_enabled AND USE_RUSTLS) if(_items) list(SORT _items CASE INSENSITIVE) diff --git a/acinclude.m4 b/acinclude.m4 index ed8b0499dd..3528b8507e 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -885,7 +885,7 @@ AC_DEFUN([CURL_CHECK_LIBS_CLOCK_GETTIME_MONOTONIC], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$curl_func_clock_gettime" = "yes"; then + test "$curl_func_clock_gettime" = "yes"; then AC_MSG_CHECKING([if monotonic clock_gettime works]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ diff --git a/configure.ac b/configure.ac index a21847ea66..0054bdb250 100644 --- a/configure.ac +++ b/configure.ac @@ -4097,7 +4097,8 @@ case $host_os in CURL_RUN_IFELSE( [ #include - int main(void) { + int main(void) + { time_t t = -1; return t < 0; } diff --git a/docs/HTTP3.md b/docs/HTTP3.md index 74254233b2..07535f1559 100644 --- a/docs/HTTP3.md +++ b/docs/HTTP3.md @@ -232,8 +232,7 @@ Build curl: % git clone --depth 1 https://github.com/curl/curl % cd curl % autoreconf -fi - % ./configure --with-openssl=$PWD/../quiche/boringssl \ - --with-quiche=$PWD/../quiche/target/release + % ./configure --with-openssl=$PWD/../quiche/boringssl --with-quiche=$PWD/../quiche/target/release % make % make install diff --git a/docs/INSTALL-CMAKE.md b/docs/INSTALL-CMAKE.md index 8ed9e405ec..815cdddcd4 100644 --- a/docs/INSTALL-CMAKE.md +++ b/docs/INSTALL-CMAKE.md @@ -468,7 +468,7 @@ Details via CMake Examples: -- `-DLIBPSL_INCLUDE_DIR=/path/to/libpl/include`, +- `-DLIBPSL_INCLUDE_DIR=/path/to/libpsl/include`, which directory contains `libpsl.h`. No ending slash or backslash is necessary. @@ -521,7 +521,8 @@ Available variables: - `HAVE_MBEDTLS_DES_CRYPT_ECB`: `mbedtls_des_crypt_ecb` present in mbedTLS <4. - `HAVE_OPENSSL_SRP`: `SSL_CTX_set_srp_username` present in OpenSSL (or fork). - `HAVE_QUICHE_CONN_SET_QLOG_FD`: `quiche_conn_set_qlog_fd` present in quiche. -- `HAVE_RUSTLS_SUPPORTED_HPKE`: `rustls_supported_hpke` present in Rustls (unused if Rustls is detected via `pkg-config`). +- `HAVE_RUSTLS_SUPPORTED_HPKE`: `rustls_supported_hpke` present in Rustls + (unused if Rustls is detected via `pkg-config`). - `HAVE_SSL_SET0_WBIO`: `SSL_set0_wbio` present in OpenSSL (or fork). - `HAVE_SSL_SET1_ECH_CONFIG_LIST`: `SSL_set1_ech_config_list` present in OpenSSL (or fork). - `HAVE_SSL_SET_QUIC_TLS_CBS`: `SSL_set_quic_tls_cbs` in OpenSSL. @@ -543,27 +544,37 @@ Note: These variables are internal and subject to change. ## Useful build targets -- `testdeps`: Build test dependencies (test binaries, test certificates). - Test certificates: `build-certs` (clean with `clean-certs`) -- `tests`: Run tests (`runtests.pl`). Customize via the `TFLAGS` environment variable, e.g. `TFLAGS=1621`. - Other flavors: `test-am`, `test-ci`, `test-event`, `test-full`, `test-nonflaky`, `test-quiet`, `test-torture` +- `testdeps`: Build test dependencies (test binaries, + test certificates). + Test certificates: `build-certs` + (clean with `clean-certs`) +- `tests`: Run tests (`runtests.pl`). Customize via the `TFLAGS` + environment variable, e.g. `TFLAGS=1621`. + Other flavors: `test-am`, `test-ci`, `test-event`, + `test-full`, `test-nonflaky`, `test-quiet`, + `test-torture` - `tt`: Build test binaries (servers, tools). - Individual targets: `curlinfo`, `libtests`, `servers`, `tunits`, `units` + Individual targets: `curlinfo`, `libtests`, + `servers`, `tunits`, `units` - `curl-pytest`: Run tests (pytest). Other flavor: `curl-test-ci` - `curl-examples`: Build examples Individual targets: `curl-example-`, where is the .c filename without extension. -- `curl-examples-build`: Build examples quickly but without the ability to run them. (for build tests) +- `curl-examples-build`: Build examples quickly but without the ability + to run them. (for build tests) - `curl-man`: Build man pages. (built by default unless disabled) - `curl`: Build curl tool. - `curl_uninstall`: Uninstall curl. -- `curl-completion-fish`: Build shell completions for fish. (built by default if enabled) -- `curl-completion-zsh`: Build shell completions for zsh. (built by default if enabled) +- `curl-completion-fish`: Build shell completions for fish. + (built by default if enabled) +- `curl-completion-zsh`: Build shell completions for zsh. + (built by default if enabled) - `curl-ca-bundle`: Build the CA bundle via `scripts/mk-ca-bundle.pl`. - `curl-ca-firefox`: Build the CA bundle via `scripts/firefox-db2pem.sh`. - `curl-lint`: Run lint checks. -- `curl-listcats`: Generate help category constants for `src/tool_help.h` from documentation. +- `curl-listcats`: Generate help category constants for + `src/tool_help.h` from documentation. - `curl-listhelp`: Generate `src/tool_listhelp.c` from documentation. - `curl-optiontable`: Generate `lib/easyoptions.c` from documentation. diff --git a/docs/INSTALL.md b/docs/INSTALL.md index 25dbe9a633..f98cdb11b0 100644 --- a/docs/INSTALL.md +++ b/docs/INSTALL.md @@ -311,17 +311,17 @@ curl from the source code: > [!Note] > If an error occurs during the installation, then try: -- Use `cmake` to configure and/or build -- Use `ninja` to build (much faster) +- Using `cmake` to configure and/or build +- Using `ninja` to build (much faster) - Reinstalling the required Cygwin packages from the list above without passing `-I` to `setup-x86_64` -- Temporarily move Cygwin to the top of your path -- Install all of the Cygwin build packages using +- Temporarily moving Cygwin to the top of your path +- Installing all of the Cygwin build packages using `setup-x86_64 --build-depends curl` ## MS-DOS -You can use either autotools or cmake: +You can use either autotools or CMake: ```sh ./configure \ @@ -360,7 +360,7 @@ Notes: ## AmigaOS -You can use either autotools or cmake: +You can use either autotools or CMake: ```sh ./configure \ diff --git a/docs/MANUAL.md b/docs/MANUAL.md index fb62f64ba2..d979455d84 100644 --- a/docs/MANUAL.md +++ b/docs/MANUAL.md @@ -24,7 +24,7 @@ Get a directory listing of an FTP site: curl ftp://ftp.example.com/ -Get the all terms matching curl from a dictionary: +Get all terms matching curl from a dictionary: curl dict://dict.example.com/m:curl @@ -57,7 +57,7 @@ Get a file from an SSH server using SCP using a private key (password-protected) to authenticate: curl -u username: --key ~/.ssh/id_rsa --pass private_key_password - scp://example.com/~/file.txt + scp://example.com/~/file.txt Get the main page from an IPv6 web server: diff --git a/docs/RELEASE-PROCEDURE.md b/docs/RELEASE-PROCEDURE.md index e62a90cbd7..81dcbc6284 100644 --- a/docs/RELEASE-PROCEDURE.md +++ b/docs/RELEASE-PROCEDURE.md @@ -104,7 +104,7 @@ Release candidate tarballs are ephemeral and each such tarball is only kept around for a few weeks. They are provided on their dedicated webpage at: https://curl.se/rc/ -The git tags for release candidate are temporary and remain set only for a +The git tags for release candidates are temporary and remain set only for a limited period of time. **Do not use release candidates in production**. They are work in progress. diff --git a/docs/cmdline-opts/Makefile.am b/docs/cmdline-opts/Makefile.am index 019dd57b8a..7c2604b647 100644 --- a/docs/cmdline-opts/Makefile.am +++ b/docs/cmdline-opts/Makefile.am @@ -37,11 +37,11 @@ GN_0 = @echo " GENERATE" $@; GN_1 = GN_ = $(GN_0) -MANAGEN=$(top_srcdir)/scripts/managen -MAXLINE=$(top_srcdir)/scripts/maxline +MANAGEN = $(top_srcdir)/scripts/managen +MAXLINE = $(top_srcdir)/scripts/maxline # Maximum number of columns accepted in the ASCII version of the man page -INCDIR=$(top_srcdir)/include +INCDIR = $(top_srcdir)/include if BUILD_DOCS CLEANFILES = $(MANPAGE) $(ASCIIPAGE) diff --git a/docs/cmdline-opts/_URL.md b/docs/cmdline-opts/_URL.md index 700e711359..c20cd762bd 100644 --- a/docs/cmdline-opts/_URL.md +++ b/docs/cmdline-opts/_URL.md @@ -15,10 +15,10 @@ specify command line options and URLs mixed and in any order on the command line. curl attempts to reuse connections when doing multiple transfers, so that -getting many files from the same server do not use multiple connects and setup -handshakes. This improves speed. Connection reuse can only be done for URLs -specified for a single command line invocation and cannot be performed between -separate curl runs. +getting many files from the same server does not use multiple connects and +setup handshakes. This improves speed. Connection reuse can only be done for +URLs specified for a single command line invocation and cannot be performed +between separate curl runs. Everything provided on the command line that is not a command line option or its argument, curl assumes is a URL and treats it as such. diff --git a/docs/examples/http2-serverpush.c b/docs/examples/http2-serverpush.c index e54675ceac..0d97c1e64a 100644 --- a/docs/examples/http2-serverpush.c +++ b/docs/examples/http2-serverpush.c @@ -38,7 +38,7 @@ #include #ifndef CURLPIPE_MULTIPLEX -#error "too old libcurl, cannot do HTTP/2 server push!" +#error "too old libcurl, cannot do HTTP/2 server push" #endif #if defined(_MSC_VER) && (_MSC_VER < 1900) diff --git a/docs/libcurl/curl_formadd.md b/docs/libcurl/curl_formadd.md index f988e03876..fadb1b95a5 100644 --- a/docs/libcurl/curl_formadd.md +++ b/docs/libcurl/curl_formadd.md @@ -213,7 +213,7 @@ See example below. ~~~c #include /* for strlen */ -static const char record[]="data in a buffer"; +static const char record[] = "data in a buffer"; int main(void) { @@ -277,7 +277,7 @@ int main(void) forms[0].value = file1; forms[1].option = CURLFORM_FILE; forms[1].value = file2; - forms[2].option = CURLFORM_END; + forms[2].option = CURLFORM_END; /* Add a buffer to upload */ curl_formadd(&post, &last, diff --git a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.md b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.md index d7613f1247..96269eb4c8 100644 --- a/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.md +++ b/docs/libcurl/opts/CURLOPT_COPYPOSTFIELDS.md @@ -63,7 +63,7 @@ int main(void) CURL *curl = curl_easy_init(); if(curl) { CURLcode result; - char local_buffer[1024]="data to send"; + char local_buffer[1024] = "data to send"; curl_easy_setopt(curl, CURLOPT_URL, "https://example.com"); /* size of the data to copy from the buffer and send in the request */ diff --git a/lib/creds.h b/lib/creds.h index 0664d08a4f..4a469d69f6 100644 --- a/lib/creds.h +++ b/lib/creds.h @@ -73,8 +73,8 @@ bool Curl_creds_equal(struct Curl_creds *c1, struct Curl_creds *c2); /* Provides properties for creds or, if creds is NULL, the empty string */ #define Curl_creds_has_user(c) ((c) && (c)->user[0]) #define Curl_creds_has_passwd(c) ((c) && (c)->passwd[0]) -#define Curl_creds_has_user_or_pass(c) \ - ((c) && ((c)->user[0] || (c)->passwd[0])) +#define Curl_creds_has_user_or_pass(c) \ + ((c) && ((c)->user[0] || (c)->passwd[0])) #define Curl_creds_has_oauth_bearer(c) ((c) && (c)->oauth_bearer[0]) #define Curl_creds_has_sasl_service(c) ((c) && (c)->sasl_service[0]) #define Curl_creds_user(c) ((c) ? (c)->user : "") diff --git a/lib/curl_addrinfo.c b/lib/curl_addrinfo.c index a927d44c99..ea818a38e5 100644 --- a/lib/curl_addrinfo.c +++ b/lib/curl_addrinfo.c @@ -24,24 +24,24 @@ #include "curl_setup.h" #ifdef HAVE_NETINET_IN_H -# include +#include #endif #ifdef HAVE_NETINET_IN6_H -# include +#include #endif #ifdef HAVE_NETDB_H -# include +#include #endif #ifdef HAVE_ARPA_INET_H -# include +#include #endif #ifdef HAVE_SYS_UN_H -# include +#include #endif #ifdef __VMS -# include -# include +#include +#include #endif #include /* for offsetof() */ diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 861e07649d..a26bb23cb2 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -957,7 +957,7 @@ struct timeval { (RECV_TYPE_ARG4)(0)) #else /* HAVE_RECV */ #ifndef sread -#error "Missing definition of macro sread!" +#error "Missing definition of macro sread" #endif #endif /* HAVE_RECV */ @@ -980,7 +980,7 @@ struct timeval { #endif /* SEND_NONCONST_ARG2 */ #else /* HAVE_SEND */ #ifndef swrite -#error "Missing definition of macro swrite!" +#error "Missing definition of macro swrite" #endif #endif /* HAVE_SEND */ @@ -1194,7 +1194,7 @@ typedef unsigned int curl_bit; */ #if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H) # if defined(SOCKET) || defined(USE_WINSOCK) -# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!" +# error "Winsock and lwIP TCP/IP stack definitions shall not coexist" # endif #endif diff --git a/lib/formdata.c b/lib/formdata.c index 681902db71..823f4bf590 100644 --- a/lib/formdata.c +++ b/lib/formdata.c @@ -186,7 +186,7 @@ static void free_formlist(struct FormInfo *ptr) * curl_formadd(&post, &last, CURLFORM_COPYNAME, "name", * CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10L, * CURLFORM_END); - * (if CURLFORM_CONTENTSLENGTH is missing strlen () is used) + * (if CURLFORM_CONTENTSLENGTH is missing strlen() is used) * * storing a filename (CONTENTTYPE is optional!): * curl_formadd(&post, &last, CURLFORM_COPYNAME, "name", diff --git a/lib/http_aws_sigv4.c b/lib/http_aws_sigv4.c index 780eed67b9..9c80c1ea9b 100644 --- a/lib/http_aws_sigv4.c +++ b/lib/http_aws_sigv4.c @@ -52,7 +52,7 @@ #define TIMESTAMP_SIZE 17 -/* hex-encoded with trailing null */ +/* hex-encoded with null-terminator */ #define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1) #define MAX_QUERY_COMPONENTS 128 diff --git a/lib/if2ip.c b/lib/if2ip.c index fd34f204b5..5ae256e13c 100644 --- a/lib/if2ip.c +++ b/lib/if2ip.c @@ -24,31 +24,31 @@ #include "curl_setup.h" #ifdef HAVE_NETINET_IN_H -# include +#include #endif #ifdef HAVE_ARPA_INET_H -# include +#include #endif #ifdef HAVE_NET_IF_H -# include +#include #endif #ifdef HAVE_SYS_IOCTL_H -# include +#include #endif #ifdef HAVE_NETDB_H -# include +#include #endif #ifdef HAVE_SYS_SOCKIO_H -# include +#include #endif #ifdef HAVE_IFADDRS_H -# include +#include #endif #ifdef HAVE_STROPTS_H -# include +#include #endif #ifdef __VMS -# include +#include #endif #include "curlx/inet_ntop.h" diff --git a/lib/socks_sspi.c b/lib/socks_sspi.c index 10a8be1773..4474180e7b 100644 --- a/lib/socks_sspi.c +++ b/lib/socks_sspi.c @@ -37,7 +37,7 @@ #include "curlx/multibyte.h" /* - * Helper sspi error functions. + * Helper SSPI error functions. */ static int check_sspi_err(struct Curl_easy *data, SECURITY_STATUS status, diff --git a/lib/transfer.c b/lib/transfer.c index 1a4138f6c1..11d36ac427 100644 --- a/lib/transfer.c +++ b/lib/transfer.c @@ -51,7 +51,7 @@ #endif #ifndef HAVE_SOCKET -#error "We cannot compile without socket() support!" +#error "We cannot compile without socket() support" #endif #include "urldata.h" diff --git a/lib/url.c b/lib/url.c index 505e08a7e1..d0e0286d2f 100644 --- a/lib/url.c +++ b/lib/url.c @@ -55,7 +55,7 @@ #endif #ifndef HAVE_SOCKET -#error "We cannot compile without socket() support!" +#error "We cannot compile without socket() support" #endif #if defined(HAVE_IF_NAMETOINDEX) && defined(USE_WINSOCK) diff --git a/lib/urlapi.c b/lib/urlapi.c index 07817c780c..a664c7304b 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -1764,7 +1764,7 @@ static CURLUcode set_url(CURLU *u, const char *url, size_t part_size, /* if the old URL is incomplete (we cannot get an absolute URL in 'oldurl'), replace the existing with the new. Always include "scheme://" to make the URL "complete" */ - uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags& ~CURLU_NO_GUESS_SCHEME); + uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME); if(uc == CURLUE_OUT_OF_MEMORY) return uc; else if(uc) diff --git a/lib/urldata.h b/lib/urldata.h index d4d336d8db..35d2c3f528 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -37,7 +37,7 @@ #define DEFAULT_CONNCACHE_SIZE 5 -/* length of longest IPv6 address string including the trailing null */ +/* length of longest IPv6 address string including the null-terminator */ #define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255") /* Max string input length is a precaution against abuse and to detect junk diff --git a/lib/vtls/openssl.h b/lib/vtls/openssl.h index 4fa466b367..e707910be0 100644 --- a/lib/vtls/openssl.h +++ b/lib/vtls/openssl.h @@ -33,7 +33,7 @@ * , , or something else, does this: * #define X509_NAME ((LPCSTR)7) * - * In AWC-LC/BoringSSL's there is: + * In AWS-LC/BoringSSL's there is: * typedef struct X509_name_st X509_NAME; * etc. * diff --git a/m4/curl-apple-sectrust.m4 b/m4/curl-apple-sectrust.m4 index c70b7ac8cd..decef05c58 100644 --- a/m4/curl-apple-sectrust.m4 +++ b/m4/curl-apple-sectrust.m4 @@ -57,5 +57,4 @@ if test "x$OPT_APPLE_SECTRUST" = "xyes"; then else AC_MSG_RESULT(no) fi - ]) diff --git a/m4/curl-compilers.m4 b/m4/curl-compilers.m4 index 8b7da20caa..5d838a318c 100644 --- a/m4/curl-compilers.m4 +++ b/m4/curl-compilers.m4 @@ -188,7 +188,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_GNU_C], [ AC_MSG_CHECKING([if compiler is GNU C]) CURL_CHECK_DEF([__GNUC__], [], [silent]) if test "$curl_cv_have_def___GNUC__" = "yes" && - test "$compiler_id" = "unknown"; then + test "$compiler_id" = "unknown"; then AC_MSG_RESULT([yes]) compiler_id="GNU_C" AC_MSG_CHECKING([compiler version]) @@ -305,8 +305,8 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPS_C], [ CURL_CHECK_DEF([__GNUC__], [], [silent]) CURL_CHECK_DEF([__sgi], [], [silent]) if test "$curl_cv_have_def___GNUC__" = "no" && - test "$curl_cv_have_def___sgi" = "yes" && - test "$compiler_id" = "unknown"; then + test "$curl_cv_have_def___sgi" = "yes" && + test "$compiler_id" = "unknown"; then AC_MSG_RESULT([yes]) compiler_id="SGI_MIPS_C" flags_dbg_yes="-g" @@ -330,8 +330,8 @@ AC_DEFUN([CURL_CHECK_COMPILER_SGI_MIPSPRO_C], [ CURL_CHECK_DEF([_COMPILER_VERSION], [], [silent]) CURL_CHECK_DEF([_SGI_COMPILER_VERSION], [], [silent]) if test "$curl_cv_have_def___GNUC__" = "no" && - (test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" || - test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then + (test "$curl_cv_have_def__SGI_COMPILER_VERSION" = "yes" || + test "$curl_cv_have_def__COMPILER_VERSION" = "yes"); then AC_MSG_RESULT([yes]) compiler_id="SGI_MIPSPRO_C" flags_dbg_yes="-g" @@ -1016,7 +1016,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [pointer-arith write-strings]) dnl If not cross-compiling with a gcc older than 3.0 if test "$cross_compiling" != "yes" || - test "$compiler_num" -ge "300"; then + test "$compiler_num" -ge "300"; then CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [unused shadow]) fi fi @@ -1026,7 +1026,7 @@ AC_DEFUN([CURL_SET_COMPILER_WARNING_OPTS], [ CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [nested-externs]) dnl If not cross-compiling with a gcc older than 3.0 if test "$cross_compiling" != "yes" || - test "$compiler_num" -ge "300"; then + test "$compiler_num" -ge "300"; then CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-declarations]) CURL_ADD_COMPILER_WARNINGS([tmp_CFLAGS], [missing-prototypes]) fi @@ -1476,7 +1476,7 @@ AC_DEFUN([CURL_CHECK_COMPILER_STRUCT_MEMBER_SIZE], [ tst_compiler_check_two_works="yes" ]) if test "$tst_compiler_check_one_works" = "yes" && - test "$tst_compiler_check_two_works" = "yes"; then + test "$tst_compiler_check_two_works" = "yes"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) diff --git a/m4/curl-confopts.m4 b/m4/curl-confopts.m4 index d3e1a33b6b..146e2e308e 100644 --- a/m4/curl-confopts.m4 +++ b/m4/curl-confopts.m4 @@ -371,7 +371,7 @@ AC_DEFUN([CURL_CONFIGURE_SYMBOL_HIDING], [ CFLAG_CURL_SYMBOL_HIDING="" doing_symbol_hiding="no" if test "$want_symbol_hiding" = "yes" && - test "$supports_symbol_hiding" = "yes"; then + test "$supports_symbol_hiding" = "yes"; then doing_symbol_hiding="yes" CFLAG_CURL_SYMBOL_HIDING="$symbol_hiding_CFLAGS" AC_DEFINE_UNQUOTED(CURL_EXTERN_SYMBOL, $symbol_hiding_EXTERN, diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4 index 8b81d736cb..490c1e5d1f 100644 --- a/m4/curl-functions.m4 +++ b/m4/curl-functions.m4 @@ -1254,7 +1254,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_compi_getaddrinfo" = "yes"; then + test "$tst_compi_getaddrinfo" = "yes"; then AC_MSG_CHECKING([if getaddrinfo seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -1301,7 +1301,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETADDRINFO], [ fi if test "$tst_compi_getaddrinfo" = "yes" && - test "$tst_works_getaddrinfo" != "no"; then + test "$tst_works_getaddrinfo" != "no"; then AC_MSG_CHECKING([if getaddrinfo usage allowed]) if test "x$curl_disallow_getaddrinfo" != "xyes"; then AC_MSG_RESULT([yes]) @@ -1958,7 +1958,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_compi_getifaddrs" = "yes"; then + test "$tst_compi_getifaddrs" = "yes"; then AC_MSG_CHECKING([if getifaddrs seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -1986,7 +1986,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GETIFADDRS], [ fi if test "$tst_compi_getifaddrs" = "yes" && - test "$tst_works_getifaddrs" != "no"; then + test "$tst_works_getifaddrs" != "no"; then AC_MSG_CHECKING([if getifaddrs usage allowed]) if test "x$curl_disallow_getifaddrs" != "xyes"; then AC_MSG_RESULT([yes]) @@ -2079,7 +2079,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_compi_gmtime_r" = "yes"; then + test "$tst_compi_gmtime_r" = "yes"; then AC_MSG_CHECKING([if gmtime_r seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -2106,7 +2106,7 @@ AC_DEFUN([CURL_CHECK_FUNC_GMTIME_R], [ fi if test "$tst_compi_gmtime_r" = "yes" && - test "$tst_works_gmtime_r" != "no"; then + test "$tst_works_gmtime_r" != "no"; then AC_MSG_CHECKING([if gmtime_r usage allowed]) if test "x$curl_disallow_gmtime_r" != "xyes"; then AC_MSG_RESULT([yes]) @@ -2199,7 +2199,7 @@ AC_DEFUN([CURL_CHECK_FUNC_LOCALTIME_R], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_compi_localtime_r" = "yes"; then + test "$tst_compi_localtime_r" = "yes"; then AC_MSG_CHECKING([if localtime_r seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -2226,7 +2226,7 @@ AC_DEFUN([CURL_CHECK_FUNC_LOCALTIME_R], [ fi if test "$tst_compi_localtime_r" = "yes" && - test "$tst_works_localtime_r" != "no"; then + test "$tst_works_localtime_r" != "no"; then AC_MSG_CHECKING([if localtime_r usage allowed]) if test "x$curl_disallow_localtime_r" != "xyes"; then AC_MSG_RESULT([yes]) @@ -2319,7 +2319,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_compi_inet_ntop" = "yes"; then + test "$tst_compi_inet_ntop" = "yes"; then AC_MSG_CHECKING([if inet_ntop seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -2400,7 +2400,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_NTOP], [ fi if test "$tst_compi_inet_ntop" = "yes" && - test "$tst_works_inet_ntop" != "no"; then + test "$tst_works_inet_ntop" != "no"; then AC_MSG_CHECKING([if inet_ntop usage allowed]) if test "x$curl_disallow_inet_ntop" != "xyes"; then AC_MSG_RESULT([yes]) @@ -2493,7 +2493,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_compi_inet_pton" = "yes"; then + test "$tst_compi_inet_pton" = "yes"; then AC_MSG_CHECKING([if inet_pton seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -2554,7 +2554,7 @@ AC_DEFUN([CURL_CHECK_FUNC_INET_PTON], [ fi if test "$tst_compi_inet_pton" = "yes" && - test "$tst_works_inet_pton" != "no"; then + test "$tst_works_inet_pton" != "no"; then AC_MSG_CHECKING([if inet_pton usage allowed]) if test "x$curl_disallow_inet_pton" != "xyes"; then AC_MSG_RESULT([yes]) @@ -3994,7 +3994,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_glibc_strerror_r" = "yes"; then + test "$tst_glibc_strerror_r" = "yes"; then AC_MSG_CHECKING([if strerror_r seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -4023,7 +4023,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ fi if test "$tst_compi_strerror_r" = "yes" && - test "$tst_works_glibc_strerror_r" != "yes"; then + test "$tst_works_glibc_strerror_r" != "yes"; then AC_MSG_CHECKING([if strerror_r is POSIX like]) tst_posix_strerror_r_type_arg3="unknown" for arg3 in 'size_t' 'int' 'unsigned int'; do @@ -4057,7 +4057,7 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ dnl only do runtime verification when not cross-compiling if test "$cross_compiling" != "yes" && - test "$tst_posix_strerror_r" = "yes"; then + test "$tst_posix_strerror_r" = "yes"; then AC_MSG_CHECKING([if strerror_r seems to work]) CURL_RUN_IFELSE([ AC_LANG_PROGRAM([[ @@ -4092,13 +4092,13 @@ AC_DEFUN([CURL_CHECK_FUNC_STRERROR_R], [ tst_glibc_strerror_r="no" fi if test "$tst_glibc_strerror_r" = "yes" && - test "$tst_works_glibc_strerror_r" != "no" && - test "$tst_posix_strerror_r" != "yes"; then + test "$tst_works_glibc_strerror_r" != "no" && + test "$tst_posix_strerror_r" != "yes"; then tst_allow_strerror_r="check" fi if test "$tst_posix_strerror_r" = "yes" && - test "$tst_works_posix_strerror_r" != "no" && - test "$tst_glibc_strerror_r" != "yes"; then + test "$tst_works_posix_strerror_r" != "no" && + test "$tst_glibc_strerror_r" != "yes"; then tst_allow_strerror_r="check" fi if test "$tst_allow_strerror_r" = "check"; then diff --git a/m4/curl-reentrant.m4 b/m4/curl-reentrant.m4 index eb585ad64d..bf073e2ff6 100644 --- a/m4/curl-reentrant.m4 +++ b/m4/curl-reentrant.m4 @@ -409,7 +409,7 @@ AC_DEFUN([CURL_CONFIGURE_REENTRANT], [ AC_MSG_CHECKING([if _REENTRANT is onwards defined]) if test "$tmp_reentrant_initially_defined" = "yes" || - test "$tmp_need_reentrant" = "yes"; then + test "$tmp_need_reentrant" = "yes"; then CURL_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT AC_MSG_RESULT([yes]) else @@ -463,7 +463,7 @@ AC_DEFUN([CURL_CONFIGURE_THREAD_SAFE], [ AC_MSG_CHECKING([if _THREAD_SAFE is onwards defined]) if test "$tmp_thread_safe_initially_defined" = "yes" || - test "$tmp_need_thread_safe" = "yes"; then + test "$tmp_need_thread_safe" = "yes"; then CURL_CONFIGURE_FROM_NOW_ON_WITH_THREAD_SAFE AC_MSG_RESULT([yes]) else diff --git a/scripts/cd2nroff b/scripts/cd2nroff index 27717cfbe3..23fc4285cb 100755 --- a/scripts/cd2nroff +++ b/scripts/cd2nroff @@ -59,7 +59,7 @@ Usage: cd2nroff [options] [file.md] specified directory, instead of writing to stdout -e If -d is used, this option can provide an added "extension", arbitrary text really, to append to the filename. --h This help text, +-h This help text -v Show version then exit HELP ; @@ -542,7 +542,7 @@ sub single { } if($d =~ /^[ \t]*\n/) { # replaced away all contents - $blankline= 1; + $blankline = 1; } else { push @desc, $d; diff --git a/src/tool_getparam.c b/src/tool_getparam.c index 35c01b1d92..a039ad1cb8 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -73,7 +73,7 @@ static ParameterError getstrn(char **str, const char *val, } /* this array MUST be alphasorted based on the 'lname' */ -static const struct LongShort aliases[]= { +static const struct LongShort aliases[] = { {"abstract-unix-socket", ARG_FILE, ' ', C_ABSTRACT_UNIX_SOCKET}, {"alpn", ARG_BOOL|ARG_NO|ARG_TLS, ' ', C_ALPN}, {"alt-svc", ARG_STRG, ' ', C_ALT_SVC}, diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am index 85e523a363..0ef33e0adc 100644 --- a/tests/data/Makefile.am +++ b/tests/data/Makefile.am @@ -287,8 +287,7 @@ test3216 test3217 test3218 test3219 test3220 test3221 test3222 \ \ test3300 test3301 test3302 test3303 test3304 test3305 \ \ -test3400 \ -test3401 \ +test3400 test3401 \ \ test4000 test4001 diff --git a/tests/ftpserver.pl b/tests/ftpserver.pl index bbfa05ce74..d0a3e22fa2 100755 --- a/tests/ftpserver.pl +++ b/tests/ftpserver.pl @@ -2884,7 +2884,7 @@ sub customize { $retrnosize = 1; } elsif($_ =~ /RETRSIZE (\d+)/) { - $retrsize= $1; + $retrsize = $1; logmsg "FTPD: instructed to use RETRSIZE = $1\n"; } elsif($_ =~ /PASVBADIP/) { diff --git a/tests/http/test_32_ftps_vsftpd.py b/tests/http/test_32_ftps_vsftpd.py index 1181bb3211..a466d130b6 100644 --- a/tests/http/test_32_ftps_vsftpd.py +++ b/tests/http/test_32_ftps_vsftpd.py @@ -121,8 +121,8 @@ class TestFtpsVsFTPD: curl = CurlClient(env=env) docname = 'data-1k' count = 2 - url1= f'ftps://{env.ftp_domain}:{vsftpds.port}/{docname}' - url2 = f'ftp://{env.ftp_domain}:{vsftpds.port}/{docname}' + url1 = f'ftps://{env.ftp_domain}:{vsftpds.port}/{docname}' + url2 = f'ftp://{env.ftp_domain}:{vsftpds.port}/{docname}' r = curl.ftp_get(urls=[url1, url2], with_stats=True) r.check_stats(count=count, http_status=226) assert r.total_connects == count + 1, 'should reuse the control conn' diff --git a/tests/libtest/lib668.c b/tests/libtest/lib668.c index 33cf25e549..cd9897f7e9 100644 --- a/tests/libtest/lib668.c +++ b/tests/libtest/lib668.c @@ -94,8 +94,8 @@ static CURLcode test_lib668(const char *URL) curl_mime_data_cb(part, (curl_off_t)-1, t668_read_cb, NULL, NULL, &pooh2); part = curl_mime_addpart(mime); curl_mime_name(part, "field3"); - /* Regular file part sources early end of data can be detected because - the file size is known. In addition, and EOF test is performed. */ + /* For regular file parts, early end of data can be detected because + the file size is known. In addition, an EOF test is performed. */ curl_mime_filedata(part, libtest_arg2); /* Bind mime data to its easy handle. */ diff --git a/tests/runtests.pl b/tests/runtests.pl index d938e18694..999b8ebb01 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -558,7 +558,7 @@ sub checksystemfeatures { $curl = $_; $CURLVERSION = $1; $CURLVERNUM = $CURLVERSION; - $CURLVERNUM =~ s/^([0-9.]+)(.*)/$1/; # leading dots and numbers + $CURLVERNUM =~ s/^([0-9.]+)(.*)/$1/; # leading digits and dots $curl =~ s/^(.*)(libcurl.*)/$1/g or die "Failure determining curl binary version"; $libcurl = $2; @@ -983,7 +983,7 @@ sub citest_starttest { my $testnum = $_[0]; # get the name of the test early - my $testname= (getpart("client", "name"))[0]; + my $testname = (getpart("client", "name"))[0]; chomp $testname; # create test result in CI services @@ -1234,7 +1234,7 @@ sub singletest_count { logmsg sprintf("test %04d...", $testnum) if(!$automakestyle); # name of the test - my $testname= (getpart("client", "name"))[0]; + my $testname = (getpart("client", "name"))[0]; chomp $testname; logmsg "[$testname]\n" if(!$short); @@ -1280,7 +1280,7 @@ sub singletest_check { my $ok = ""; my $res; chomp $errorcode; - my $testname= (getpart("client", "name"))[0]; + my $testname = (getpart("client", "name"))[0]; chomp $testname; # what parts to cut off from stdout/stderr @@ -1429,7 +1429,7 @@ sub singletest_check { my @strippart = getpart("verify", "strippart"); # this is the valid protocol blurb curl should generate - my @protocol= getpart("verify", "protocol"); + my @protocol = getpart("verify", "protocol"); if(@protocol) { # Verify the sent request my @out = loadarray("$logdir/$SERVERIN"); @@ -1447,7 +1447,7 @@ sub singletest_check { # strip off all lines that match the patterns from both arrays chomp $_; @out = striparray( $_, \@out); - @protocol= striparray( $_, \@protocol); + @protocol = striparray( $_, \@protocol); } for my $strip (@strippart) { @@ -1617,7 +1617,7 @@ sub singletest_check { # strip off all lines that match the patterns from both arrays chomp $_; @out = striparray( $_, \@out); - @proxyprot= striparray( $_, \@proxyprot); + @proxyprot = striparray( $_, \@proxyprot); } for my $strip (@strippart) { @@ -1951,8 +1951,8 @@ sub singletest_check { sub singletest_success { my ($testnum, $count, $total, $errorreturncode) = @_; - my $sofar= time()-$start; - my $esttotal = $sofar/$count * $total; + my $sofar = time() - $start; + my $esttotal = $sofar / $count * $total; my $estleft = $esttotal - $sofar; my $timeleft = sprintf("remaining: %02d:%02d", $estleft / 60, @@ -1965,7 +1965,7 @@ sub singletest_success { $count, $total, $timeleft, $took, $duration); } else { - my $testname= (getpart("client", "name"))[0]; + my $testname = (getpart("client", "name"))[0]; chomp $testname; logmsg "PASS: $testnum - $testname\n"; } diff --git a/tests/server/dnsd.c b/tests/server/dnsd.c index 8fb899bf26..b9a50c120b 100644 --- a/tests/server/dnsd.c +++ b/tests/server/dnsd.c @@ -722,7 +722,7 @@ static void read_instructions(void) rc = buf[0] ? 0 : 1; } if(rc != 1) { - logmsg("Bad line in %s: '%s'\n", file, buf); + logmsg("Bad line in %s: '%s'", file, buf); } else if(rtype) { logmsg("added %s record via '%s'", rtype, buf); diff --git a/tests/server/rtspd.c b/tests/server/rtspd.c index 36973185ed..fe2dded9fa 100644 --- a/tests/server/rtspd.c +++ b/tests/server/rtspd.c @@ -738,7 +738,7 @@ static int rtspd_send_doc(curl_socket_t sock, struct rtspd_httprequest *req) break; case DOCNUMBER_404: default: - logmsg("Replying to with a 404"); + logmsg("Replying with a 404"); if(req->protocol == RPROT_HTTP) { buffer = doc404_HTTP; } diff --git a/tests/server/sws.c b/tests/server/sws.c index a24b3277ca..8190002af2 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -721,7 +721,7 @@ static int sws_ProcessRequest(struct sws_httprequest *req) test case send a rejection before any such data has been sent. Test case 154 uses this.*/ if(req->auth_req && !req->auth) { - logmsg("Return early due to auth requested by none provided"); + logmsg("Return early due to auth requested but none provided"); return 1; /* done */ } @@ -813,7 +813,7 @@ static int sws_send_doc(curl_socket_t sock, struct sws_httprequest *req) break; case DOCNUMBER_404: default: - logmsg("Replying to with a 404"); + logmsg("Replying with a 404"); buffer = doc404; break; } @@ -1893,11 +1893,11 @@ static int service_connection(curl_socket_t *msgsock, /* if we got a CONNECT, loop and get another request as well! */ if(req->open) { - logmsg("=> persistent connection request ended, awaits new request\n"); + logmsg("=> persistent connection request ended, awaits new request"); return 1; } else { - logmsg("=> NOT a persistent connection, close close CLOSE\n"); + logmsg("=> NOT a persistent connection, close close CLOSE"); } return -1; @@ -2036,7 +2036,7 @@ static int test_sws(int argc, const char *argv[]) opt = argv[arg]; if(curlx_str_number(&opt, &num, 0xffff)) { fprintf(stderr, "sws: invalid --keepalive argument (%s), must " - "be number of seconds\n", argv[arg]); + "be a number of seconds\n", argv[arg]); return 0; } keepalive_secs = (unsigned short)num; diff --git a/tests/server/tftpd.c b/tests/server/tftpd.c index f730506649..8f2ab642cd 100644 --- a/tests/server/tftpd.c +++ b/tests/server/tftpd.c @@ -287,7 +287,7 @@ static void nak(int error) memcpy(tp->th_msg, pe->e_msg, length + 1); length += 5; if(swrite(peer, &trsbuf.storage[0], length) != length) - logmsg("nak: fail\n"); + logmsg("nak: fail"); } /* diff --git a/tests/server/util.c b/tests/server/util.c index 77d635a9e9..05a2e898cc 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -336,23 +336,18 @@ typedef void (*SIGHANDLER_T)(int); #ifdef SIGHUP static SIGHANDLER_T old_sighup_handler = SIG_ERR; #endif - #ifdef SIGPIPE static SIGHANDLER_T old_sigpipe_handler = SIG_ERR; #endif - #ifdef SIGALRM static SIGHANDLER_T old_sigalrm_handler = SIG_ERR; #endif - #ifdef SIGINT static SIGHANDLER_T old_sigint_handler = SIG_ERR; #endif - #ifdef SIGTERM static SIGHANDLER_T old_sigterm_handler = SIG_ERR; #endif - #if defined(SIGBREAK) && defined(_WIN32) static SIGHANDLER_T old_sigbreak_handler = SIG_ERR; #endif @@ -502,8 +497,8 @@ static LRESULT CALLBACK main_window_proc(HWND hwnd, UINT uMsg, } return DefWindowProc(hwnd, uMsg, wParam, lParam); } -/* Window message queue loop for hidden main window, details see above. - */ + +/* Window message queue loop for hidden main window, details see above. */ static DWORD WINAPI main_window_loop(void *lpParameter) { WNDCLASS wc; diff --git a/tests/test1139.pl b/tests/test1139.pl index 81a33bb537..ac09d4f590 100755 --- a/tests/test1139.pl +++ b/tests/test1139.pl @@ -114,7 +114,7 @@ my @curlmopt; open($r, "<", $syms) or die "no input file"; while(<$r>) { chomp; - my $l= $_; + my $l = $_; if($l =~ /(CURL(OPT|INFO|MOPT)_\w+) *([0-9.]*) *([0-9.-]*) *([0-9.]*)/) { my ($opt, $type, $add, $dep, $rem) = ($1, $2, $3, $4, $5); @@ -232,7 +232,7 @@ open($r, "<", "$buildroot/docs/cmdline-opts/curl.1") or my @manpage; # store all parsed parameters while(<$r>) { chomp; - my $l= $_; + my $l = $_; $l =~ s/\\-/-/g; if($l =~ /^\.IP \"(-[^\"]*)\"/) { my $str = $1; @@ -259,7 +259,7 @@ open($r, "<", "$root/src/tool_listhelp.c") or die "no input file"; my @toolhelp; # store all parsed parameters while(<$r>) { chomp; - my $l= $_; + my $l = $_; if(/^ \{ \" *(.*)/) { my $str = $1; my $combo; diff --git a/tests/test1140.pl b/tests/test1140.pl index d7f56043f4..320f9f9439 100755 --- a/tests/test1140.pl +++ b/tests/test1140.pl @@ -91,7 +91,7 @@ sub file { $errors++; } if($l =~ /^\.BR (.*)/) { - my $i= $1; + my $i = $1; while($i =~ s/((lib|)curl([^ ]*)) *\"\(3\)(,|) *\" *//i ) { my $man = "$1.3"; $man =~ s/\\//g; # cut off backslashes diff --git a/tests/unit/unit2413.c b/tests/unit/unit2413.c index a800971ae1..ef11c48b7c 100644 --- a/tests/unit/unit2413.c +++ b/tests/unit/unit2413.c @@ -90,19 +90,19 @@ static CURLcode test_unit2413(const char *arg) } test_create2413("peer1", curl, &Curl_scheme_https, "test.curl.se", 1234, - "test.curl.se", FALSE, NULL); + "test.curl.se", FALSE, NULL); test_create2413("peer2", curl, &Curl_scheme_https, "127.0.0.1", 1234, - "127.0.0.1", FALSE, NULL); + "127.0.0.1", FALSE, NULL); test_create2413("peer3", curl, &Curl_scheme_https, "::1", 1234, - "::1", TRUE, NULL); + "::1", TRUE, NULL); test_create2413("peer3", curl, &Curl_scheme_https, "[::1]", 1234, - "::1", TRUE, NULL); + "::1", TRUE, NULL); test_create2413("peer4", curl, &Curl_scheme_https, "test.curl.se.", 1234, - "test.curl.se.", FALSE, NULL); + "test.curl.se.", FALSE, NULL); test_create2413("peer5", curl, &Curl_scheme_https, "[::1%tada]", 1234, - "::1", TRUE, "tada"); + "::1", TRUE, "tada"); test_create2413("peer6", curl, &Curl_scheme_https, "::1%tada", 1234, - "::1", TRUE, "tada"); + "::1", TRUE, "tada"); curl_easy_cleanup(curl); Curl_peer_unlink(&peer);