Skip to content

Commit 1b48c61

Browse files
committed
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 curl#19565
1 parent a873838 commit 1b48c61

32 files changed

Lines changed: 62 additions & 71 deletions

.github/workflows/http3-linux.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ jobs:
189189
if: ${{ steps.cache-openssl-http3-no-deprecated.outputs.cache-hit != 'true' }}
190190
run: |
191191
cd ~
192-
git clone --quiet --depth=1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
192+
git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
193193
cd openssl
194194
./config --prefix="$PWD"/build --libdir=lib no-makedepend no-apps no-docs no-tests no-deprecated
195195
make
@@ -232,7 +232,7 @@ jobs:
232232
if: ${{ steps.cache-gnutls.outputs.cache-hit != 'true' }}
233233
run: |
234234
cd ~
235-
git clone --quiet --depth=1 -b "${GNUTLS_VERSION}" https://github.com/gnutls/gnutls.git
235+
git clone --quiet --depth 1 -b "${GNUTLS_VERSION}" https://github.com/gnutls/gnutls
236236
cd gnutls
237237
# required: nettle-dev libp11-kit-dev libev-dev autopoint bison gperf gtk-doc-tools libtasn1-bin
238238
./bootstrap
@@ -247,7 +247,7 @@ jobs:
247247
if: ${{ steps.cache-wolfssl.outputs.cache-hit != 'true' }}
248248
run: |
249249
cd ~
250-
git clone --quiet --depth=1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl.git
250+
git clone --quiet --depth 1 -b "v${WOLFSSL_VERSION}-stable" https://github.com/wolfSSL/wolfssl
251251
cd wolfssl
252252
./autogen.sh
253253
./configure --disable-dependency-tracking --enable-all --enable-quic \
@@ -259,9 +259,9 @@ jobs:
259259
if: ${{ steps.cache-nghttp3.outputs.cache-hit != 'true' }}
260260
run: |
261261
cd ~
262-
git clone --quiet --depth=1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3
262+
git clone --quiet --depth 1 -b "v${NGHTTP3_VERSION}" https://github.com/ngtcp2/nghttp3
263263
cd nghttp3
264-
git submodule update --init --depth=1
264+
git submodule update --init --depth 1
265265
autoreconf -fi
266266
./configure --disable-dependency-tracking --prefix="$PWD"/build --enable-lib-only
267267
make
@@ -272,7 +272,7 @@ jobs:
272272
# building twice to get crypto libs for ossl, libressl and awslc installed
273273
run: |
274274
cd ~
275-
git clone --quiet --depth=1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2
275+
git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2
276276
cd ngtcp2
277277
autoreconf -fi
278278
./configure --disable-dependency-tracking --prefix="$PWD"/build \
@@ -290,7 +290,7 @@ jobs:
290290
if: ${{ steps.cache-ngtcp2-boringssl.outputs.cache-hit != 'true' }}
291291
run: |
292292
cd ~
293-
git clone --quiet --depth=1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl
293+
git clone --quiet --depth 1 -b "v${NGTCP2_VERSION}" https://github.com/ngtcp2/ngtcp2 ngtcp2-boringssl
294294
cd ngtcp2-boringssl
295295
autoreconf -fi
296296
./configure --disable-dependency-tracking --prefix="$PWD"/build \
@@ -303,9 +303,9 @@ jobs:
303303
if: ${{ steps.cache-nghttp2.outputs.cache-hit != 'true' }}
304304
run: |
305305
cd ~
306-
git clone --quiet --depth=1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2
306+
git clone --quiet --depth 1 -b "v${NGHTTP2_VERSION}" https://github.com/nghttp2/nghttp2
307307
cd nghttp2
308-
git submodule update --init --depth=1
308+
git submodule update --init --depth 1
309309
autoreconf -fi
310310
# required (for nghttpx application): libc-ares-dev libev-dev zlib1g-dev
311311
# optional (for nghttpx application): libbrotli-dev
@@ -578,7 +578,7 @@ jobs:
578578
if: ${{ matrix.build.name == 'quiche' && steps.cache-quiche.outputs.cache-hit != 'true' }}
579579
run: |
580580
cd ~
581-
git clone --quiet --depth=1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche.git
581+
git clone --quiet --depth 1 -b "${QUICHE_VERSION}" --recursive https://github.com/cloudflare/quiche
582582
cd quiche
583583
#### Work-around https://github.com/curl/curl/issues/7927 #######
584584
#### See https://github.com/alexcrichton/cmake-rs/issues/131 ####

.github/workflows/linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ jobs:
580580
- name: 'build openssl (thread sanitizer)'
581581
if: ${{ contains(matrix.build.install_steps, 'openssl-tsan') && steps.cache-openssl-tsan.outputs.cache-hit != 'true' }}
582582
run: |
583-
git clone --quiet --depth=1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
583+
git clone --quiet --depth 1 -b "openssl-${OPENSSL_VERSION}" https://github.com/openssl/openssl
584584
cd openssl
585585
CC=clang CFLAGS='-fsanitize=thread' LDFLAGS='-fsanitize=thread' ./config --prefix=/home/runner/openssl --libdir=lib no-makedepend no-apps no-docs no-tests
586586
make

CMakeLists.txt

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
# SPDX-License-Identifier: curl
2222
#
2323
###########################################################################
24-
# by Tetetest and Sukender (Benoit Neil)
2524

2625
cmake_minimum_required(VERSION 3.7...3.16 FATAL_ERROR)
2726
message(STATUS "Using CMake version ${CMAKE_VERSION}")
@@ -1741,9 +1740,9 @@ check_function_exists("eventfd" HAVE_EVENTFD)
17411740
check_symbol_exists("ftruncate" "unistd.h" HAVE_FTRUNCATE)
17421741
check_symbol_exists("getpeername" "${CURL_INCLUDES}" HAVE_GETPEERNAME) # winsock2.h unistd.h proto/bsdsocket.h
17431742
check_symbol_exists("getsockname" "${CURL_INCLUDES}" HAVE_GETSOCKNAME) # winsock2.h unistd.h proto/bsdsocket.h
1744-
check_function_exists("getrlimit" HAVE_GETRLIMIT)
1745-
check_function_exists("setlocale" HAVE_SETLOCALE)
1746-
check_function_exists("setrlimit" HAVE_SETRLIMIT)
1743+
check_function_exists("getrlimit" HAVE_GETRLIMIT)
1744+
check_function_exists("setlocale" HAVE_SETLOCALE)
1745+
check_function_exists("setrlimit" HAVE_SETRLIMIT)
17471746

17481747
if(WIN32)
17491748
# include wincrypt.h as a workaround for mingw-w64 __MINGW64_VERSION_MAJOR <= 5 header bug */
@@ -1752,9 +1751,9 @@ else()
17521751
check_function_exists("if_nametoindex" HAVE_IF_NAMETOINDEX) # net/if.h
17531752
check_function_exists("realpath" HAVE_REALPATH)
17541753
check_function_exists("sched_yield" HAVE_SCHED_YIELD)
1755-
check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
1756-
check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
1757-
check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
1754+
check_symbol_exists("strcasecmp" "string.h" HAVE_STRCASECMP)
1755+
check_symbol_exists("stricmp" "string.h" HAVE_STRICMP)
1756+
check_symbol_exists("strcmpi" "string.h" HAVE_STRCMPI)
17581757
endif()
17591758

17601759
check_function_exists("setmode" HAVE_SETMODE)

docs/BINDINGS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ Go: [go-curl](https://github.com/andelf/go-curl) by ShuYu Wang
6161

6262
[Haskell](https://hackage.haskell.org/package/curl) Written by Galois, Inc
6363

64-
[Hollywood](https://web.archive.org/web/20250116185836/https://www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn
64+
[Hollywood](https://web.archive.org/web/20250116185836/www.hollywood-mal.com/download.html) hURL by Andreas Falkenhahn
6565

6666
[Java](https://github.com/covers1624/curl4j)
6767

docs/HTTP3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ versions do not work.
5454

5555
Build OpenSSL (version 3.5.0 or newer):
5656

57-
% git clone --quiet --depth=1 -b openssl-$OPENSSL_VERSION https://github.com/openssl/openssl
57+
% git clone --depth 1 -b openssl-$OPENSSL_VERSION https://github.com/openssl/openssl
5858
% cd openssl
5959
% ./config --prefix=<somewhere1> --libdir=lib
6060
% make

docs/THANKS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ Benjamin Sergeant
361361
Ben Kohler
362362
Ben Madsen
363363
Ben Noordhuis
364-
Benoit Neil
364+
Benoit Neil (Sukender)
365365
Benoit Pierre
366366
Benoit Sigoure
367367
Ben Van Hof
@@ -3148,6 +3148,7 @@ Temprimus
31483148
Terence Eden
31493149
Terri Oda
31503150
Terry Wu
3151+
Tetetest
31513152
thanhchungbtc on github
31523153
TheAssassin on github
31533154
TheBitBrine
@@ -3328,6 +3329,7 @@ UrsusArctos on github
33283329
User Sg
33293330
ustcqidi on github
33303331
Vadim Grinshpun
3332+
Vaibhav Kumar
33313333
Valentin David
33323334
Valentín Gutiérrez
33333335
Valentin Richter

docs/examples/crawler.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ static size_t follow_links(CURLM *multi, struct memory *mem,
170170
return count;
171171
}
172172

173-
static int is_html(char *ctype)
173+
static int is_html(const char *ctype)
174174
{
175175
return ctype != NULL && strlen(ctype) > 10 && strstr(ctype, "text/html");
176176
}

docs/examples/ftpuploadfrommem.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ struct WriteThis {
4848
static size_t read_cb(char *ptr, size_t size, size_t nmemb, void *userp)
4949
{
5050
struct WriteThis *upload = (struct WriteThis *)userp;
51-
size_t max = size*nmemb;
51+
size_t max = size * nmemb;
5252

5353
if(max < 1)
5454
return 0;

docs/examples/ftpuploadresume.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static size_t getcontentlengthfunc(void *ptr, size_t size, size_t nmemb,
3939

4040
r = sscanf(ptr, "Content-Length: %ld\n", &len);
4141
if(r == 1)
42-
*((long *) stream) = len;
42+
*((long *)stream) = len;
4343

4444
return size * nmemb;
4545
}

docs/examples/ghiper.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,9 +430,9 @@ int init_fifo(void)
430430
int main(void)
431431
{
432432
struct GlobalInfo *g = g_malloc0(sizeof(struct GlobalInfo));
433-
GMainLoop*gmain;
433+
GMainLoop *gmain;
434434
int fd;
435-
GIOChannel* ch;
435+
GIOChannel *ch;
436436

437437
CURLcode res = curl_global_init(CURL_GLOBAL_ALL);
438438
if(res)

0 commit comments

Comments
 (0)