]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
spacecheck: warn for 3+ empty lines in a row, fix fallouts
authorViktor Szakats <commit@vsz.me>
Thu, 4 Sep 2025 13:25:27 +0000 (15:25 +0200)
committerViktor Szakats <commit@vsz.me>
Thu, 4 Sep 2025 18:37:51 +0000 (20:37 +0200)
Closes #18478

14 files changed:
.github/scripts/spacecheck.pl
docs/examples/ephiperfifo.c
docs/examples/evhiperfifo.c
docs/examples/hiperfifo.c
lib/bufq.c
lib/curl_sha512_256.c
lib/ftp.c
lib/mime.c
lib/ws.c
packages/OS400/README.OS400
tests/libtest/lib557.c
tests/runner.pm
tests/servers.pm
winbuild/MakefileBuild.vc

index b395ee35e0c2834f67699067ee71724a7c4bf53a..e61d30b5b0c9901ea776094482f82e887ad87ca7 100755 (executable)
@@ -151,6 +151,11 @@ while(my $filename = <$git_ls_files>) {
         push @err, "content: has multiple EOL at EOF";
     }
 
+    if($content =~ /\n\n\n\n/ ||
+        $content =~ /\r\n\r\n\r\n\r\n/) {
+        push @err, "content: has 3 or more consecutive empty lines";
+    }
+
     if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
         push @err, "content: has binary contents";
     }
index f411d2ea6c4caebb7040fc7fa648bc9b6c23bbd9..d30b944bbc9531757b67786845271fb7c0e2934c 100644 (file)
@@ -245,7 +245,6 @@ static void timer_cb(struct GlobalInfo *g, int revents)
 }
 
 
-
 /* Clean up the SockInfo structure */
 static void remsock(struct SockInfo *f, struct GlobalInfo *g)
 {
@@ -260,7 +259,6 @@ static void remsock(struct SockInfo *f, struct GlobalInfo *g)
 }
 
 
-
 /* Assign information to a SockInfo structure */
 static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
                     struct GlobalInfo *g)
@@ -287,7 +285,6 @@ static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
 }
 
 
-
 /* Initialize a new SockInfo structure */
 static void addsock(curl_socket_t s, CURL *easy, int action,
                     struct GlobalInfo *g)
@@ -328,7 +325,6 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
 }
 
 
-
 /* CURLOPT_WRITEFUNCTION */
 static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
 {
index 96937fc62810c583a90b05ff90dce23ad25f886a..b28f057c8242b4e89f6ca32a0e3b70633f9c6083 100644 (file)
@@ -165,7 +165,6 @@ static void mcode_or_die(const char *where, CURLMcode code)
 }
 
 
-
 /* Check for completed transfers, and remove their easy handles */
 static void check_multi_info(struct GlobalInfo *g)
 {
@@ -193,7 +192,6 @@ static void check_multi_info(struct GlobalInfo *g)
 }
 
 
-
 /* Called by libevent when we get action on a multi socket */
 static void event_cb(EV_P_ struct ev_io *w, int revents)
 {
@@ -243,7 +241,6 @@ static void remsock(struct SockInfo *f, struct GlobalInfo *g)
 }
 
 
-
 /* Assign information to a SockInfo structure */
 static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
                     struct GlobalInfo *g)
@@ -265,7 +262,6 @@ static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
 }
 
 
-
 /* Initialize a new SockInfo structure */
 static void addsock(curl_socket_t s, CURL *easy, int action,
                     struct GlobalInfo *g)
index d1e534ffbd2d3520d8986a4a05072e104f29998c..35a519b63e4170a959bf05557f43d11c03a04407 100644 (file)
@@ -188,7 +188,6 @@ static void check_multi_info(struct GlobalInfo *g)
 }
 
 
-
 /* Called by libevent when we get action on a multi socket */
 static void event_cb(int fd, short kind, void *userp)
 {
@@ -212,7 +211,6 @@ static void event_cb(int fd, short kind, void *userp)
 }
 
 
-
 /* Called by libevent when our timeout expires */
 static void timer_cb(int fd, short kind, void *userp)
 {
@@ -228,7 +226,6 @@ static void timer_cb(int fd, short kind, void *userp)
 }
 
 
-
 /* Clean up the SockInfo structure */
 static void remsock(struct SockInfo *f)
 {
@@ -241,7 +238,6 @@ static void remsock(struct SockInfo *f)
 }
 
 
-
 /* Assign information to a SockInfo structure */
 static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
                     struct GlobalInfo *g)
@@ -261,7 +257,6 @@ static void setsock(struct SockInfo *f, curl_socket_t s, CURL *e, int act,
 }
 
 
-
 /* Initialize a new SockInfo structure */
 static void addsock(curl_socket_t s, CURL *easy, int action,
                     struct GlobalInfo *g)
@@ -302,7 +297,6 @@ static int sock_cb(CURL *e, curl_socket_t s, int what, void *cbp, void *sockp)
 }
 
 
-
 /* CURLOPT_WRITEFUNCTION */
 static size_t write_cb(void *ptr, size_t size, size_t nmemb, void *data)
 {
index 40d1af0c1d3a95a7f66ee58230574e3dc37ef960..5cfd7520f2e65dd6dde726241c28818b4d74f7f3 100644 (file)
@@ -149,7 +149,6 @@ static void chunk_list_free(struct buf_chunk **anchor)
 }
 
 
-
 void Curl_bufcp_init(struct bufc_pool *pool,
                      size_t chunk_size, size_t spare_max)
 {
index e11b2d6a9cf1a8e4ad7bd1133164102330e43594..7e9b223387e0631de6e330aa128bc5c809c2a155 100644 (file)
@@ -665,7 +665,6 @@ static CURLcode Curl_sha512_256_update(void *context,
 }
 
 
-
 /**
  * Size of "length" insertion in bits.
  * See FIPS PUB 180-4 section 5.1.2.
index 6d7c210ce54d7083703e0276dcf5604c1935dcc1..29c2f789a3e974bf3c20eff3bf72681b0d23c354 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -3774,7 +3774,6 @@ static CURLcode ftp_do_more(struct Curl_easy *data, int *completep)
 }
 
 
-
 /***********************************************************************
  *
  * ftp_perform()
index adce922950ab303dcb2f29124b50343ec8827f16..894413be17f294186916d1d1881df810463230d8 100644 (file)
@@ -129,7 +129,6 @@ static const char aschex[] =
   "\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x41\x42\x43\x44\x45\x46";
 
 
-
 #ifndef __VMS
 #define filesize(name, stat_data) (stat_data.st_size)
 #define fopen_read fopen
index a73ab61b0b47a8fc1e265784fbc5e1961ab1653e..229539c3f3b257fc76f0d3b777d69ecac53877b4 100644 (file)
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -882,7 +882,6 @@ static CURLcode ws_enc_write_payload(struct ws_encoder *enc,
 }
 
 
-
 struct cr_ws_ctx {
   struct Curl_creader super;
   BIT(read_eos);  /* we read an EOS from the next reader */
index 41bd24237fa48bd4a0a1711cda0e7c05ae1b0a58..e7699e16860974e0838ee6d9d94ad10b514d0703 100644 (file)
@@ -256,7 +256,6 @@ _ TELNET
 _ TFTP
 
 
-
 Compiling on OS/400:
 
   These instructions targets people who knows about OS/400, compiling, IFS and
@@ -328,7 +327,6 @@ _ Do not use original source include files unless you know what you are doing.
   /curl/include/curl).
 
 
-
 ILE/RPG support:
 
   Since most of the ILE OS/400 programmers use ILE/RPG exclusively, a
index dd0e2e7c4d638e42e0bccce0a606449ff64601e9..9742272a44090467a3790e6216aa639d32ec4307 100644 (file)
@@ -1222,7 +1222,6 @@ static int test_width_precision(void)
 }
 
 
-
 static int test_weird_arguments(void)
 {
   int errors = 0;
index 6fe327a6b772d806598b19977200280c2d3d9347..62f722f319bc62abe9fd405bce024b48146410a7 100644 (file)
@@ -1140,7 +1140,6 @@ sub singletest_postcheck {
 }
 
 
-
 ###################################################################
 # Get ready to run a single test case
 sub runner_test_preprocess {
index 41b7ae41c99c0225705dcdd6ac5f6e721bf81713..e625058870760b5561889f7ec7be8606d12297de 100644 (file)
@@ -2244,8 +2244,6 @@ sub runnegtelnetserver {
 }
 
 
-
-
 #######################################################################
 # Single shot http and gopher server responsiveness test. This should only
 # be used to verify that a server present in %run hash is still functional
index 8d1dd2888133cf7d48b81ee69f0a34298d09fc02..509e43e263d7ef882f843c687fa9681393384517 100644 (file)
@@ -422,7 +422,6 @@ CFGSET = true
 !ENDIF
 
 
-
 # CURL_XX macros are for the curl.exe command
 
 !IF "$(DEBUG)"=="yes"