From: Viktor Szakats Date: Fri, 10 Jul 2026 22:44:25 +0000 (+0200) Subject: tidy-up: miscellaneous X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;ds=inline;p=thirdparty%2Fcurl.git tidy-up: miscellaneous - CMake/CurlTests.c: sync indent with rest of file and most of code. - cmake: sync term in `_CURL_PREFILL` description with rest of code. - curl_setup.h: document function relying on `_CRT_SECURE_NO_WARNINGS`. - tests/http/scorecard.py: typo in message. - 'Quiche' -> 'quiche'. - fix comment and formatting nits. Closes #22378 --- diff --git a/CMake/CurlTests.c b/CMake/CurlTests.c index c9d0b93d21..f43521bfd6 100644 --- a/CMake/CurlTests.c +++ b/CMake/CurlTests.c @@ -133,7 +133,7 @@ int main(void) #ifdef HAVE_IOCTLSOCKET #ifdef _WIN32 -# include +#include #endif int main(void) { @@ -160,7 +160,7 @@ int main(void) #ifdef HAVE_IOCTLSOCKET_CAMEL_FIONBIO #include #ifdef HAVE_SYS_IOCTL_H -# include +#include #endif int main(void) { @@ -175,7 +175,7 @@ int main(void) #ifdef HAVE_IOCTLSOCKET_FIONBIO #ifdef _WIN32 -# include +#include #endif int main(void) { @@ -190,19 +190,19 @@ int main(void) #ifdef HAVE_IOCTL_FIONBIO /* headers for FIONBIO test */ #ifdef HAVE_SYS_TYPES_H -# include +#include #endif #ifdef HAVE_UNISTD_H -# include +#include #endif #ifndef _WIN32 -# include +#include #endif #ifdef HAVE_SYS_IOCTL_H -# include +#include #endif #ifdef HAVE_STROPTS_H -# include +#include #endif int main(void) { @@ -217,19 +217,19 @@ int main(void) #ifdef HAVE_IOCTL_SIOCGIFADDR /* headers for SIOCGIFADDR test */ #ifdef HAVE_SYS_TYPES_H -# include +#include #endif #ifdef HAVE_UNISTD_H -# include +#include #endif #ifndef _WIN32 -# include +#include #endif #ifdef HAVE_SYS_IOCTL_H -# include +#include #endif #ifdef HAVE_STROPTS_H -# include +#include #endif #include int main(void) @@ -244,13 +244,13 @@ int main(void) #ifdef HAVE_SETSOCKOPT_SO_NONBLOCK #ifdef _WIN32 -# include +#include #endif #ifdef HAVE_SYS_TYPES_H -# include +#include #endif #ifndef _WIN32 -# include +#include #endif int main(void) { @@ -338,13 +338,13 @@ int main(void) #ifdef HAVE_ATOMIC #ifdef HAVE_SYS_TYPES_H -# include +#include #endif #ifdef HAVE_UNISTD_H -# include +#include #endif #ifdef HAVE_STDATOMIC_H -# include +#include #endif int main(void) { @@ -356,10 +356,10 @@ int main(void) #ifdef HAVE_WIN32_WINNT #ifdef _WIN32 -# ifndef NOGDI -# define NOGDI -# endif -# include +#ifndef NOGDI +#define NOGDI +#endif +#include #endif #define enquote(x) #x @@ -374,7 +374,7 @@ int main(void) #ifdef MINGW64_VERSION #ifdef __MINGW32__ -# include <_mingw.h> +#include <_mingw.h> #endif #define enquote(x) #x diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c49e3cb37..54032401a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -617,7 +617,7 @@ include(CheckSymbolExists) include(CheckTypeSize) include(CheckCSourceCompiles) -option(_CURL_PREFILL "Fast-track known feature detection results (Windows, some Apple)" "${WIN32}") +option(_CURL_PREFILL "Pre-fill known feature detection results (Windows, some Apple)" "${WIN32}") mark_as_advanced(_CURL_PREFILL) if(_CURL_PREFILL) if(WIN32) diff --git a/configure.ac b/configure.ac index 9958bdbe69..6b87ee6e3e 100644 --- a/configure.ac +++ b/configure.ac @@ -3814,7 +3814,7 @@ if test "$want_quiche" != "no"; then AC_CHECK_LIB(quiche, quiche_conn_send_ack_eliciting, [ AC_CHECK_HEADERS(quiche.h, - experimental="$experimental Quiche" + experimental="$experimental quiche" AC_MSG_NOTICE([HTTP3 support is experimental]) curl_h3_msg="enabled (quiche)" AC_DEFINE(USE_QUICHE, 1, [if quiche is in use]) diff --git a/docs/EXPERIMENTAL.md b/docs/EXPERIMENTAL.md index 9e39a9b36c..b1b472c5ba 100644 --- a/docs/EXPERIMENTAL.md +++ b/docs/EXPERIMENTAL.md @@ -53,7 +53,7 @@ Graduation requirements: - implementation stability over time with no known severe regressions -### The Quiche backend +### The quiche backend Graduation requirements: diff --git a/lib/curl_setup.h b/lib/curl_setup.h index 487a3c5e39..00e4694bc7 100644 --- a/lib/curl_setup.h +++ b/lib/curl_setup.h @@ -90,7 +90,7 @@ /* Disable Visual Studio warnings: 4127 "conditional expression is constant" */ #pragma warning(disable:4127) #ifndef _CRT_SECURE_NO_WARNINGS -#define _CRT_SECURE_NO_WARNINGS /* for getenv(), sscanf() */ +#define _CRT_SECURE_NO_WARNINGS /* for getenv(), sscanf(), vsnprintf() */ #endif #endif /* _MSC_VER */ diff --git a/lib/curlx/fopen.c b/lib/curlx/fopen.c index c3601af06a..30754b310a 100644 --- a/lib/curlx/fopen.c +++ b/lib/curlx/fopen.c @@ -110,7 +110,7 @@ static bool fix_excessive_path(const TCHAR *in, TCHAR **out) const wchar_t *in_w; wchar_t *fbuf = NULL; - /* MS documented "approximate" limit for the maximum path length */ + /* MS-documented "approximate" limit for the maximum path length */ const size_t max_path_len = 32767; #ifndef _UNICODE diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c index a17aa94004..96c1157669 100644 --- a/lib/vssh/libssh2.c +++ b/lib/vssh/libssh2.c @@ -373,8 +373,8 @@ static CURLcode ssh_knownhost(struct Curl_easy *data, (conn->origin->port != PORT_SSH) ? conn->origin->port : -1, remotekey, keylen, - LIBSSH2_KNOWNHOST_TYPE_PLAIN| - LIBSSH2_KNOWNHOST_KEYENC_RAW| + LIBSSH2_KNOWNHOST_TYPE_PLAIN | + LIBSSH2_KNOWNHOST_KEYENC_RAW | keybit, &host); diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c index 6bbeb0487b..17c1c8d195 100644 --- a/lib/vtls/schannel.c +++ b/lib/vtls/schannel.c @@ -1368,7 +1368,7 @@ static CURLcode schannel_connect_step2(struct Curl_cfilter *cf, /* check if the handshake needs to be continued */ result = CURLE_OK; for(i = 0; i < 3; i++) { - /* search for handshake tokens that need to be send */ + /* search for handshake tokens that need to be sent */ if(outbuf[i].BufferType == SECBUFFER_TOKEN && outbuf[i].cbBuffer > 0) { size_t written = 0; DEBUGF(infof(data, "schannel: sending next handshake data: " diff --git a/tests/http/scorecard.py b/tests/http/scorecard.py index 60b1a35f4c..5bc24cf2c9 100644 --- a/tests/http/scorecard.py +++ b/tests/http/scorecard.py @@ -474,7 +474,7 @@ class ScoreRunner: if self._limit_rate: title = f'Download Speed ({self.protocol}), limit={Card.fmt_speed(self._limit_rate_num)}, from {meta["server"]}' else: - title = f'Downloads ({self.protocol})from {meta["server"]}' + title = f'Downloads ({self.protocol}) from {meta["server"]}' if self._socks_args: title += f' via {self._socks_args}' return { diff --git a/tests/http/testenv/mod_curltest/mod_curltest.c b/tests/http/testenv/mod_curltest/mod_curltest.c index 3eec35381d..0bb0c78a36 100644 --- a/tests/http/testenv/mod_curltest/mod_curltest.c +++ b/tests/http/testenv/mod_curltest/mod_curltest.c @@ -394,8 +394,7 @@ static int curltest_tweak_handler(request_rec *r) continue; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "query parameter not " - "understood: '%s' in %s", - arg, r->args); + "understood: '%s' in %s", arg, r->args); ap_die(HTTP_BAD_REQUEST, r); return OK; } @@ -574,8 +573,7 @@ static int curltest_put_handler(request_rec *r) } } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "query parameter not " - "understood: '%s' in %s", - arg, r->args); + "understood: '%s' in %s", arg, r->args); ap_die(HTTP_BAD_REQUEST, r); return OK; } @@ -760,8 +758,7 @@ static int curltest_sslinfo_handler(request_rec *r) continue; } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "query parameter not " - "understood: '%s' in %s", - arg, r->args); + "understood: '%s' in %s", arg, r->args); ap_die(HTTP_BAD_REQUEST, r); return OK; } @@ -869,8 +866,7 @@ static int curltest_limit_handler(request_rec *r) } } ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, "query parameter not " - "understood: '%s' in %s", - arg, r->args); + "understood: '%s' in %s", arg, r->args); ap_die(HTTP_BAD_REQUEST, r); return OK; }