]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tidy-up: whitespace (more in Perl)
authorViktor Szakats <commit@vsz.me>
Fri, 11 Jul 2025 14:04:24 +0000 (16:04 +0200)
committerViktor Szakats <commit@vsz.me>
Sat, 12 Jul 2025 06:59:44 +0000 (08:59 +0200)
Follow-up to 8eab2b70860e285525130f69b22ac5567292c659 #17896
Cherry-picked from #17877
Closes #17901

43 files changed:
docs/libcurl/mksymbolsmanpage.pl
scripts/cd2cd
scripts/cd2nroff
scripts/checksrc.pl
scripts/completion.pl
scripts/managen
scripts/mdlinkcheck
scripts/mk-ca-bundle.pl
scripts/singleuse.pl
scripts/top-complexity
src/mk-file-embed.pl
src/mkhelp.pl
tests/appveyor.pm
tests/data/test1056
tests/data/test1082
tests/data/test1083
tests/data/test1506
tests/data/test1510
tests/data/test1512
tests/data/test1542
tests/data/test2072
tests/data/test2402
tests/data/test2404
tests/data/test2502
tests/data/test8
tests/data/test96
tests/libtest/test1013.pl
tests/libtest/test613.pl
tests/pathhelp.pm
tests/runtests.pl
tests/servers.pm
tests/test1119.pl
tests/test1135.pl
tests/test1139.pl
tests/test1165.pl
tests/test1167.pl
tests/test1173.pl
tests/test1175.pl
tests/test1486.pl
tests/test1488.pl
tests/test745.pl
tests/test971.pl
tests/testcurl.pl

index c1a6b9d61bde32350426938daecfb78a0b909422..9d93abdcbdb7138c4f6ddfe3567daf82b2e98de7 100755 (executable)
@@ -25,7 +25,7 @@
 
 use POSIX qw(strftime);
 my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
     @ts = localtime($ENV{SOURCE_DATE_EPOCH});
 } else {
     @ts = localtime;
index a4de2f8757f410516e7b52758d0d816671c79e15..f1ade5a42995ba0376a085f93952ba69c98aed74 100755 (executable)
@@ -54,7 +54,7 @@ while(1) {
 
 use POSIX qw(strftime);
 my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
     @ts = localtime($ENV{SOURCE_DATE_EPOCH});
 } else {
     @ts = localtime;
index b868a4a79f4fb36e6d7a0d40525029b71dd954b3..b77122f9322cb333da8d87a3f12b76212c065c12 100755 (executable)
@@ -76,7 +76,7 @@ HELP
 
 use POSIX qw(strftime);
 my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
     @ts = gmtime($ENV{SOURCE_DATE_EPOCH});
 } else {
     @ts = localtime;
index 8dbb3f384eaa3f5713f8c3fb850e34c6c090f7b6..43b8195537913224f0c9f2852c6ff0dca475d50d 100755 (executable)
@@ -169,17 +169,17 @@ sub readlocalfile {
         $i++;
 
         # Lines starting with '#' are considered comments
-        if (/^\s*(#.*)/) {
+        if(/^\s*(#.*)/) {
             next;
         }
-        elsif (/^enable ([A-Z]+)$/) {
+        elsif(/^enable ([A-Z]+)$/) {
             if(!defined($warnings_extended{$1})) {
                 print STDERR "invalid warning specified in .checksrc: \"$1\"\n";
                 next;
             }
             $warnings{$1} = $warnings_extended{$1};
         }
-        elsif (/^disable ([A-Z]+)$/) {
+        elsif(/^disable ([A-Z]+)$/) {
             if(!defined($warnings{$1})) {
                 print STDERR "invalid warning specified in .checksrc: \"$1\"\n";
                 next;
@@ -187,10 +187,10 @@ sub readlocalfile {
             # Accept-list
             push @alist, $1;
         }
-        elsif (/^banfunc ([^ ]*)/) {
+        elsif(/^banfunc ([^ ]*)/) {
             $banfunc{$1} = $1;
         }
-        elsif (/^allowfunc ([^ ]*)/) {
+        elsif(/^allowfunc ([^ ]*)/) {
             undef $banfunc{$1};
         }
         else {
@@ -344,7 +344,7 @@ readlocalfile($file);
 do {
     if("$wlist" !~ / $file /) {
         my $fullname = $file;
-        $fullname = "$dir/$file" if ($fullname !~ '^\.?\.?/');
+        $fullname = "$dir/$file" if($fullname !~ '^\.?\.?/');
         scanfile($fullname);
     }
     $file = shift @ARGV;
index a7cf97bdad915755b90d64d118e0c0ac6368ea2a..7b689c74fbbade914472ce731b1b34c9f2c49f3a 100755 (executable)
@@ -40,13 +40,13 @@ Pod::Usage::pod2usage() if $help;
 
 my @opts = parse_main_opts($opts_dir);
 
-if ($shell eq 'fish') {
+if($shell eq 'fish') {
     print "# curl fish completion\n\n";
     print "# Complete file paths after @\n";
     print q(complete -c curl -n 'string match -qr "^@" -- (commandline -ct)' -k -xa "(printf '%s\n' -- @(__fish_complete_suffix --complete=(commandline -ct | string replace -r '^@' '') ''))");
     print "\n\n";
     print qq{$_ \n} foreach (@opts);
-} elsif ($shell eq 'zsh') {
+} elsif($shell eq 'zsh') {
     my $opts_str;
 
     $opts_str .= qq{  $_ \\\n} foreach (@opts);
@@ -99,10 +99,10 @@ sub parse_main_opts {
         $file_content = $1;
         my ($short, $long, $arg, $desc);
 
-        if ($file_content =~ /^Short:\s+(.*)\s*$/im) {$short = "-$1";}
-        if ($file_content =~ /^Long:\s+(.*)\s*$/im) {$long = "--$1";}
-        if ($file_content =~ /^Arg:\s+(.*)\s*$/im) {$arg = $1;}
-        if ($file_content =~ /^Help:\s+(.*)\s*$/im) {$desc = $1;}
+        if($file_content =~ /^Short:\s+(.*)\s*$/im) {$short = "-$1";}
+        if($file_content =~ /^Long:\s+(.*)\s*$/im) {$long = "--$1";}
+        if($file_content =~ /^Arg:\s+(.*)\s*$/im) {$arg = $1;}
+        if($file_content =~ /^Help:\s+(.*)\s*$/im) {$desc = $1;}
 
         $arg =~ s/\:/\\\:/g if defined $arg;
         $desc =~ s/'/'\\''/g if defined $desc;
@@ -112,7 +112,7 @@ sub parse_main_opts {
 
         my $option = '';
 
-        if ($shell eq 'fish') {
+        if($shell eq 'fish') {
             $option .= "complete --command curl";
             $option .= " --short-option '" . strip_dash(trim($short)) . "'"
                 if defined $short;
@@ -120,23 +120,23 @@ sub parse_main_opts {
                 if defined $long;
             $option .= " --description '" . strip_dash(trim($desc)) . "'"
                 if defined $desc;
-        } elsif ($shell eq 'zsh') {
+        } elsif($shell eq 'zsh') {
             $option .= '{' . trim($short) . ',' if defined $short;
             $option .= trim($long)  if defined $long;
             $option .= '}' if defined $short;
             $option .= '\'[' . trim($desc) . ']\'' if defined $desc;
 
-            if (defined $arg) {
+            if(defined $arg) {
                 $option .= ":'$arg'";
-                if ($arg =~ /<file ?(name)?>|<path>/) {
+                if($arg =~ /<file ?(name)?>|<path>/) {
                     $option .= ':_files';
-                } elsif ($arg =~ /<dir>/) {
+                } elsif($arg =~ /<dir>/) {
                     $option .= ":'_path_files -/'";
-                } elsif ($arg =~ /<url>/i) {
+                } elsif($arg =~ /<url>/i) {
                     $option .= ':_urls';
-                } elsif ($long =~ /ftp/ && $arg =~ /<method>/) {
+                } elsif($long =~ /ftp/ && $arg =~ /<method>/) {
                     $option .= ":'(multicwd nocwd singlecwd)'";
-                } elsif ($arg =~ /<method>/) {
+                } elsif($arg =~ /<method>/) {
                     $option .= ":'(DELETE GET HEAD POST PUT)'";
                 }
             }
index 5e03180144b722f844030655a45ba0a52cf0479e..ac54e5e0b6129cbaec4af82220d7a5ab842daa5a 100755 (executable)
@@ -49,7 +49,7 @@ my %catlong;
 
 use POSIX qw(strftime);
 my @ts;
-if (defined($ENV{SOURCE_DATE_EPOCH})) {
+if(defined($ENV{SOURCE_DATE_EPOCH})) {
     @ts = gmtime($ENV{SOURCE_DATE_EPOCH});
 } else {
     @ts = localtime;
@@ -195,7 +195,7 @@ sub printdesc {
                 chomp $l;
                 lastline($baselvl + $lvl + 1, $l);
                 my $w = ($baselvl + $lvl + 1) * $indent + length($l);
-                if ($w > $colwidth) {
+                if($w > $colwidth) {
                     print STDERR "ERROR: $w columns is too long\n";
                     print STDERR "$l\n";
                     $error++;
@@ -1176,7 +1176,7 @@ sub mainpage {
 .\\"
 .TH curl 1 "$date" "curl $version" "curl Manual"
 HEADER
-        if ($manpage);
+        if($manpage);
 
     while(<$fh>) {
         my $f = $_;
index 7df3f03d5cece3e6e209553ef866fd45ba5c51ee..33fcac9de6e9871670160d7f29ecd548712c41ad 100755 (executable)
@@ -162,4 +162,4 @@ for my $l (sort keys %flink) {
     }
 }
 
-exit 1 if ($error);
+exit 1 if($error);
index 79c78eb85b19b7103c43ece90a36b48c4cabe6fb..cb0b5860932678c3ce2759227a854dce97b62b28 100755 (executable)
@@ -268,7 +268,7 @@ sub oldhash {
     return $hash;
 }
 
-if( $opt_p !~ m/:/ ) {
+if($opt_p !~ m/:/) {
     print "Error: Mozilla trust identifier list must include both purposes and levels\n";
     HELP_MESSAGE();
 }
@@ -285,7 +285,7 @@ sub should_output_cert(%) {
     foreach my $level (@included_mozilla_trust_levels) {
         # for each level we want to output, see if any of our desired purposes are
         # included
-        return 1 if( defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ) );
+        return 1 if(defined( List::Util::first { is_in_list( $_, @included_mozilla_trust_purposes ) } @{$trust_purposes_by_level{$level}} ));
     }
 
     return 0;
@@ -656,8 +656,8 @@ unless($stdout) {
             $bk++;
         }
         rename $crt, "$crt.~${bk}~" or die "Failed to create backup $crt.~$bk}~: $!\n";
-    } elsif( -e $crt ) {
-        unlink( $crt ) or die "Failed to remove $crt: $!\n";
+    } elsif(-e $crt) {
+        unlink($crt) or die "Failed to remove $crt: $!\n";
     }
     rename "$crt.~", $crt or die "Failed to rename $crt.~ to $crt: $!\n";
 }
index 13a9ff54e1ffcc14572374e8d94e799d77123e89..b6ec18b47f16707b7d271abb14b1162d9460ff6a 100755 (executable)
@@ -176,7 +176,7 @@ open(N, "nm $file|") ||
 my %exist;
 my %uses;
 my $file;
-while (<N>) {
+while(<N>) {
     my $l = $_;
     chomp $l;
 
index 27c23d2c743c36e61b89247ebb8b95659aad1ca1..59629d960335b85cf396bc8e92898704b4b4e5b5 100755 (executable)
@@ -32,7 +32,7 @@ use warnings;
 sub checkcmd {
     my ($cmd)=@_;
     my @paths;
-    if ($^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'os2') {
+    if($^O eq 'MSWin32' || $^O eq 'dos' || $^O eq 'os2') {
         # PATH separator is different
         @paths=(split(';', $ENV{'PATH'}));
     }
@@ -41,7 +41,7 @@ sub checkcmd {
                 "/sbin", "/usr/bin", "/usr/local/bin");
     }
     for(@paths) {
-        if( -x "$_/$cmd" && ! -d "$_/$cmd" ) {
+        if(-x "$_/$cmd" && ! -d "$_/$cmd") {
             # executable bit but not a directory!
             return "$_/$cmd";
         }
index 9daa519e89ffba2f7ab059ec1cb436aab06e0a28..17530cfa14d53a4d9d2be2095ff615e501e6b39d 100755 (executable)
@@ -44,7 +44,7 @@ const unsigned char ${varname}[] = {
 HEAD
     ;
 
-while (<STDIN>) {
+while(<STDIN>) {
     my $line = $_;
     foreach my $n (split //, $line) {
         my $ord = ord($n);
index 63d59e89f651e5665994970e1be2657166bc4c4a..e104e49f18cfc0fdeefba02dea770cf52abbeeed 100755 (executable)
@@ -34,7 +34,7 @@ push @out, "     / __| | | | |_) | |\n";
 push @out, "    | (__| |_| |  _ <| |___\n";
 push @out, "     \\___|\\___/|_| \\_\\_____|\n";
 
-while (<STDIN>) {
+while(<STDIN>) {
     my $line = $_;
     push @out, $line;
 }
@@ -58,7 +58,7 @@ if($c) {
       IO::Compress::Gzip->import();
       1;
     };
-    print STDERR "Warning: compression requested but Gzip is not available\n" if (!$c)
+    print STDERR "Warning: compression requested but Gzip is not available\n" if(!$c)
 }
 
 if($c)
index 2a6a5d58c0169c119bd407b60aa0d79132a1cc7c..ed1728682c53d4eab26a61274feeff67d1cbff7e 100644 (file)
@@ -65,7 +65,7 @@ sub appveyor_create_test_result {
         }
     ' \\
     '$appveyor_baseurl/api/tests'`;
-    print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
+    print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
     $APPVEYOR_TEST_NAMES{$testnum}=$testname;
 }
 
@@ -111,7 +111,7 @@ sub appveyor_update_test_result {
         }
     ' \\
     '$appveyor_baseurl/api/tests'`;
-    print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
+    print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
     if($appveyor_category eq 'Error') {
         $appveyor_result=`$curl --silent --noproxy '*' \\
         --header 'Content-Type: application/json' \\
@@ -123,7 +123,7 @@ sub appveyor_update_test_result {
             }
         ' \\
         '$appveyor_baseurl/api/build/messages'`;
-        print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
+        print "AppVeyor API result: $appveyor_result\n" if($appveyor_result);
     }
 }
 
index 7ecc349823cd8b8d9d110fd277f2b2090cd9e1e2..afcdf137ee28a9b33eef9132795bf0a4ae130fae 100644 (file)
@@ -62,7 +62,7 @@ HTTP follow redirect from IPv4 to IPv6 with scope
 http://%HOSTIP:%HTTPPORT/we/are/all/twits/%TESTNUMBER -L
 </command>
 <precheck>
-%PERL -e "print 'Test is not supported on the Windows kernel' if ($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');"
+%PERL -e "print 'Test is not supported on the Windows kernel' if($^O eq 'MSWin32' || $^O eq 'msys' || $^O eq 'cygwin');"
 </precheck>
 </client>
 
index 7d26323a73fb3b1613f1d26798c64ad2dee2fde3..40e7b6a70c067b1fd98576e4df4ce826970b927f 100644 (file)
@@ -35,7 +35,7 @@ HTTP GET with localhost --interface
 http://%HOSTIP:%HTTPPORT/%TESTNUMBER -4 --interface 127.0.0.1
 </command>
 <precheck>
-%PERL -e "print 'Test requires default test client host address' if ( '%CLIENTIP' ne '127.0.0.1' );"
+%PERL -e "print 'Test requires default test client host address' if('%CLIENTIP' ne '127.0.0.1');"
 </precheck>
 </client>
 
index e588d7e7d1b2daf9dddde7f4031136396d75113e..dae302b110d4a05524384aebc10706f7800657a6 100644 (file)
@@ -39,7 +39,7 @@ HTTP-IPv6 GET with ip6-localhost --interface
 -g "http://%HOST6IP:%HTTP6PORT/%TESTNUMBER" --interface ip6-localhost
 </command>
 <precheck>
-%PERL -e "if ('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec '%RESOLVE --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
+%PERL -e "if('%CLIENT6IP' ne '[::1]') {print 'Test requires default test client host address';} else {exec '%RESOLVE --ipv6 ip6-localhost'; print 'Cannot run precheck resolve';}"
 </precheck>
 </client>
 
index 0a62c0c2a6424ce3729822f781e8410fdfbf63c1..90f1ed421c4763576aa8da3bfc7ec87edb8ae41f 100644 (file)
@@ -89,7 +89,7 @@ Accept: */*
 * Connection #3 to host server4.example.com left intact
 </file>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
 </stripfile>
 </verify>
 </testcase>
index d2316c01128ca0ef50a9b8d3c45b51a17d9d2160..23ef9517c99a671f8a3ab480405f6c8919db546f 100644 (file)
@@ -89,7 +89,7 @@ Accept: */*
 * Connection #3 to host server4.example.com left intact
 </file>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
 </stripfile>
 </verify>
 </testcase>
index c3a532c96b3bd418e173e33a094b346667bdd5a2..c0c23467b2a8dc7b0cb8a35d2f4e6226d997aebe 100644 (file)
@@ -74,7 +74,7 @@ Accept: */*
 ^Host:.*
 </strip>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
 </stripfile>
 </verify>
 </testcase>
index 0454d76dde5f67d6ec77548b02d6585bb8ff76c6..25df4a46e335e38fe10630e64c6ceedc62aa3ad7 100644 (file)
@@ -62,7 +62,7 @@ Accept: */*
 == Info: Connection #1 to host %HOSTIP left intact
 </file>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /(closing|shutting down) connection #\d+/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /(closing|shutting down) connection #\d+/))
 </stripfile>
 </verify>
 </testcase>
index c1a252094a0dcca162fcd31f8d86247bd8b2a55e..f2acceb78b32d70ce7e853ab525c1045adee4127 100644 (file)
@@ -27,7 +27,7 @@ file:// with Unix path resolution behavior for the case of extra slashes
 file:////%FILE_PWD/%LOGDIR/test%TESTNUMBER.txt
 </command>
 <precheck>
-%PERL -e "print 'Test requires a Unix system' if ( $^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'msys');"
+%PERL -e "print 'Test requires a Unix system' if($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'dos' || $^O eq 'msys');"
 </precheck>
 <file name="%LOGDIR/test%TESTNUMBER.txt">
 foo
index 48a485624ef12272ee8c3e8b4739151eb2b12cfc..52c582415f6d6e39a96f6efa96793881e9916c2e 100644 (file)
@@ -102,7 +102,7 @@ Via: 2 nghttpx
 * Connection #0 to host localhost left intact
 </file>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
 </stripfile>
 </verify>
 </testcase>
index 89461a468867652721e21bbe4b5c16f0c0f14c3c..e7d68299cec17451217930f62b16d4ae559c472a 100644 (file)
@@ -102,7 +102,7 @@ Via: 2 nghttpx
 * Connection #0 to host localhost left intact
 </file>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
 </stripfile>
 </verify>
 </testcase>
index e53f8804696088d69b4f9d3fb01a0796533c5db7..e86e6125ad92117f74a0bb68684e1b4d906afedb 100644 (file)
@@ -97,7 +97,7 @@ Via: 3 nghttpx
 == Info: Connection #0 to host localhost left intact
 </file>
 <stripfile>
-$_ = '' if (($_ !~ /left intact/) && ($_ !~ /Closing connection/))
+$_ = '' if(($_ !~ /left intact/) && ($_ !~ /Closing connection/))
 </stripfile>
 </verify>
 </testcase>
index e231cd7eb79a71b4a63f6f0df258f57224846d27..5ed328bbedc8a2fd05f427be90536c0e6fea4c52 100644 (file)
@@ -79,7 +79,7 @@ Set-Cookie: cookie31=%hex[%7f-junk]hex%
 
 </file>
 <precheck>
-%PERL -e 'if ("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
+%PERL -e 'if("%HOSTIP" !~ /\.0\.0\.1$/) {print "Test only works for HOSTIPs ending with .0.0.1"; exit(1)}'
 </precheck>
 <features>
 cookies
index e862b84a0cc527706b14f5a05edf0d0980d6f0b5..426715a2cb678f3a70656ab43fbaa64d09475743 100644 (file)
@@ -38,7 +38,7 @@ MEM tool_cfgable.c
 MEM tool_cfgable.c
 </file>
 <stripfile>
-$_ = '' if ((($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
+$_ = '' if((($_ !~ /tool_paramhlp/) && ($_ !~ /tool_cfgable/)) || ($_ =~ /free\(\(nil\)\)/))
 s/:\d+.*//
 s:^(MEM )(.*/)(.*):$1$3:
 </stripfile>
index 79a6de409d93089e1e13c4ed9995bf77babd939d..878077d80cf07f636be9a353b8b5e994f5c41b92 100755 (executable)
@@ -35,7 +35,7 @@ my $what=$ARGV[2];
 my $curl_protocols="";
 open(CURL, "$ARGV[1]") || die "Can't get curl $what list\n";
 while(<CURL>) {
-    $curl_protocols = $_ if ( /$what:/i );
+    $curl_protocols = $_ if(/$what:/i);
 }
 close CURL;
 
index bff7b9ddb2303ba7e86043012276276f73e1c22c..9abc0c41cd039d895a93e3849aa425a2d011ba86 100755 (executable)
@@ -36,8 +36,7 @@ sub errout {
     exit 1;
 }
 
-if($ARGV[0] eq "prepare")
-{
+if($ARGV[0] eq "prepare") {
     my $dirname = $ARGV[1];
     mkdir $dirname || errout "$!";
     chdir $dirname;
@@ -71,8 +70,7 @@ if($ARGV[0] eq "prepare")
 
     exit 0;
 }
-elsif($ARGV[0] eq "postprocess")
-{
+elsif($ARGV[0] eq "postprocess") {
     my $dirname = $ARGV[1];
     my $logfile = $ARGV[2];
 
index 571a4d5a6742406b97f4a337ef3f25e28e969a69..169582518848ee4238d2d447a284f114e65fc52f 100644 (file)
@@ -121,7 +121,7 @@ sub sys_native_abs_path {
     return File::Spec->rel2abs($path) if !os_is_win();
 
     # Do not process empty path.
-    return $path if ($path eq '');
+    return $path if($path eq '');
 
     my $res;
     if($^O eq 'msys' || $^O eq 'cygwin') {
index 37efc2a49bd5f1d57061e5f8facd27cbd3fd0b57..70aee2a07deddf36b77f189971b67b25306d2a50 100755 (executable)
@@ -305,7 +305,7 @@ delete $ENV{'CURL_CA_BUNDLE'} if($ENV{'CURL_CA_BUNDLE'});
 # set by the caller
 if(open(my $fd, "<", "config")) {
     while(my $line = <$fd>) {
-        next if ($line =~ /^#/);
+        next if($line =~ /^#/);
         chomp $line;
         my ($name, $val) = split(/\s*:\s*/, $line, 2);
         $ENV{$name} = $val if(!$ENV{$name});
@@ -941,7 +941,7 @@ sub timestampskippedevents {
 sub citest_starttestrun {
     if(azure_check_environment()) {
         $AZURE_RUN_ID = azure_create_test_run($ACURL);
-        logmsg "Azure Run ID: $AZURE_RUN_ID\n" if ($verbose);
+        logmsg "Azure Run ID: $AZURE_RUN_ID\n" if($verbose);
     }
     # Appveyor doesn't require anything here
 }
@@ -2294,7 +2294,7 @@ while(@ARGV) {
         my $exclude_file = $ARGV[0];
         open(my $fd, "<", $exclude_file) or die "Couldn't open '$exclude_file': $!";
         while(my $line = <$fd>) {
-            next if ($line =~ /^#/);
+            next if($line =~ /^#/);
             chomp $line;
             my ($type, $patterns, $skip_reason) = split(/\s*:\s*/, $line, 3);
 
@@ -2697,7 +2697,7 @@ sub disabledtests {
                     # fail hard to make user notice
                     exit 1;
                 }
-                logmsg "DISABLED: test $n\n" if ($verbose);
+                logmsg "DISABLED: test $n\n" if($verbose);
             }
             else {
                 print STDERR "$file: rubbish content: $t\n";
index c9cc4be24bd40b3cd888dc839cbbd5c712b863f4..df32ca7e4e13358f097d8dbd07f71c8cde4ffa6c 100644 (file)
@@ -166,7 +166,7 @@ sub checkcmd {
                 "/sbin", "/usr/bin", "/usr/local/bin", @extrapaths);
     }
     for(@paths) {
-        if( -x "$_/$cmd" . exe_ext('SYS') && ! -d "$_/$cmd" . exe_ext('SYS')) {
+        if(-x "$_/$cmd" . exe_ext('SYS') && ! -d "$_/$cmd" . exe_ext('SYS')) {
             # executable bit but not a directory!
             return "$_/$cmd";
         }
@@ -345,7 +345,7 @@ sub serverfortest {
 sub startnew {
     my ($cmd, $pidfile, $timeout, $fakepidfile)=@_;
 
-    logmsg "startnew: $cmd\n" if ($verbose);
+    logmsg "startnew: $cmd\n" if($verbose);
 
     my $child = fork();
 
@@ -504,7 +504,7 @@ sub stopserver {
         foreach my $lockfile (@lockfiles) {
             if(-f $lockfile) {
                 unlink($lockfile);
-                logmsg "RUN: kill $server, cleaned up $lockfile\n" if ($verbose);
+                logmsg "RUN: kill $server, cleaned up $lockfile\n" if($verbose);
             }
         }
     }
@@ -3029,7 +3029,7 @@ sub startservers {
             }
         }
         elsif($what eq "none") {
-            logmsg "* starts no server\n" if ($verbose);
+            logmsg "* starts no server\n" if($verbose);
         }
         else {
             warn "we don't support a server for $what";
index ed8247ce0c6d0646e9033a615e244da2f96e0404..d1cdf4e11c23ab19a418b17fd543612ae0b62871 100755 (executable)
@@ -67,8 +67,8 @@ my %rem;
 sub scanenum {
     my ($file) = @_;
     open my $h_in, "-|", "$Cpreprocessor $i$file" || die "Cannot preprocess $file";
-    while( <$h_in> ) {
-        if( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+    while(<$h_in>) {
+        if(/enum\s+(\S+\s+)?{/ .. /}/) {
             s/^\s+//;
             next unless /^CURL/;
             chomp;
index 0005c69309082f6c3f7bcee767d7981618d405cc..b64e4bf8a85c3084e4659f7184abbf98d6cc2658 100755 (executable)
@@ -22,8 +22,6 @@
 # SPDX-License-Identifier: curl
 #
 ###########################################################################
-#
-#
 
 use strict;
 use warnings;
index 8b2a5b623fa0aa15d64c9b9b733ada28aed069c2..cabb893d6985e5b5a2a2dfb8c5969bc6e27fa60b 100755 (executable)
@@ -202,7 +202,7 @@ while(<$r>) {
         $list=1;
     }
     elsif($list) {
-        if( /^  \{(\"[^,]*\").*\'(.)\',/) {
+        if(/^  \{(\"[^,]*\").*\'(.)\',/) {
             my ($l, $s)=($1, $2);
             my $sh;
             my $lo;
index 61fe5c184d3825a48293dd260f095f77f64ae770..a15071c256bb4ad1fa66343349cf171e6ba85a0b 100755 (executable)
@@ -22,7 +22,6 @@
 # SPDX-License-Identifier: curl
 #
 ###########################################################################
-#
 
 use strict;
 use warnings;
index f38d211cce93e2ebfa6b31aed2c314ffb6e4c550..e2965b784a531b743ddc56de587be9ec7b6ee6d1 100755 (executable)
@@ -76,7 +76,7 @@ sub scanenums {
         die "Cannot preprocess $file";
     while(<H_IN>) {
         my ($line, $linenum) = ($_, $.);
-        if( /^#(line|) (\d+) \"(.*)\"/) {
+        if(/^#(line|) (\d+) \"(.*)\"/) {
             # if the included file isn't in our incdir, then we skip this section
             # until next #line
             #
@@ -94,7 +94,7 @@ sub scanenums {
         if(/^#/) {
             next;
         }
-        if( /enum\s+(\S+\s+)?{/ .. /}/ ) {
+        if(/enum\s+(\S+\s+)?{/ .. /}/) {
             s/^\s+//;
             chomp;
             s/[,\s].*//;
index 6a096d691e33002ba0342a2eacc6dae61bd482b3..2faf472308379962b0d17bf119c97d21bcacae82 100755 (executable)
@@ -107,7 +107,7 @@ sub checkref {
         return;
     }
     foreach my $d (keys %docsdirs) {
-        if( -f "$d/$f.$sec") {
+        if(-f "$d/$f.$sec") {
             $present = 1;
             $ref{"$f.$sec"}=1;
             last;
index 2bf863fc7a901f3ac089efe5bf20bd4788a74575..c981046b7e3979d86735785812bb0597710d5304 100755 (executable)
@@ -22,8 +22,6 @@
 # SPDX-License-Identifier: curl
 #
 ###########################################################################
-#
-#
 
 use strict;
 use warnings;
index 99aa1574c756fd3dc7ef4fbd4bcb5c5d43ff5d85..4ff55c3b12cb3cf09b3fdff0dfefa28f34b80840 100755 (executable)
@@ -22,8 +22,6 @@
 # SPDX-License-Identifier: curl
 #
 ###########################################################################
-#
-#
 
 use strict;
 use warnings;
index 7038f58696e25f767745548aa3a2f92b0ae6f0d9..a8f998845e956fb96d96c2300b4ca0d7258dbe48 100755 (executable)
@@ -127,14 +127,12 @@ close $s;
 
 my $ignored=0;
 for my $e (sort @syms) {
-    if( $manpage{$e} ) {
-
-        if( $manpage{$e} ne $symadded{$e} ) {
+    if($manpage{$e}) {
+        if($manpage{$e} ne $symadded{$e}) {
             printf "%s.md says version %s, but SIV says %s\n",
                 $e, $manpage{$e}, $symadded{$e};
             $error++;
         }
-
     }
 }
 print "OK\n" if(!$error);
index acb89fa5cfb80d02eed7107ba80eefff967b25d8..02ed3be5c3f8e37d141b089425152a903a1fa671 100755 (executable)
@@ -22,8 +22,6 @@
 # SPDX-License-Identifier: curl
 #
 ###########################################################################
-#
-#
 
 use strict;
 use warnings;
index d5c573ed94dbf7ce3c1354d864a54b148d7cedf1..866914500049affe6a014ec4ecc1dfbb9c38829d 100755 (executable)
@@ -23,7 +23,6 @@
 #
 ###########################################################################
 #
-#
 # - Get all options mentioned in the $cmddir.
 # - Make sure they're all mentioned in the $opts document
 # - Make sure that the version in $opts matches the version in the file in
index 514bf1cab44e4bea2e829d2d45db25b184595771..791e366257e54002dc0e998082c611fc6a7db1d2 100755 (executable)
@@ -177,8 +177,8 @@ if(($^O eq 'MSWin32' || $^O eq 'cygwin' || $^O eq 'msys') &&
   $confheader = 'config-win32.h';
 }
 
-$ENV{LC_ALL}="C" if (($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
-$ENV{LC_CTYPE}="C" if (($ENV{LC_CTYPE}) && ($ENV{LC_CTYPE} !~ /^C$/));
+$ENV{LC_ALL}="C" if(($ENV{LC_ALL}) && ($ENV{LC_ALL} !~ /^C$/));
+$ENV{LC_CTYPE}="C" if(($ENV{LC_CTYPE}) && ($ENV{LC_CTYPE} !~ /^C$/));
 $ENV{LANG}="C";
 
 sub rmtree($) {
@@ -371,11 +371,11 @@ if(-d $CURLDIR) {
         # time we run this test
         unlink "$CURLDIR/src/tool_hugehelp.c";
         # find out if curl source dir has an in-tree c-ares repo
-        $have_embedded_ares = 1 if (-f "$CURLDIR/ares/GIT-INFO");
+        $have_embedded_ares = 1 if(-f "$CURLDIR/ares/GIT-INFO");
     } elsif(!$git && -f "$CURLDIR/tests/testcurl.pl") {
         logit "$CURLDIR is verified to be a fine daily source dir";
         # find out if curl source dir has an in-tree c-ares extracted tarball
-        $have_embedded_ares = 1 if (-f "$CURLDIR/ares/ares_build.h");
+        $have_embedded_ares = 1 if(-f "$CURLDIR/ares/ares_build.h");
     } else {
         mydie "$CURLDIR is not a daily source dir or checked out from git!"
     }
@@ -419,10 +419,10 @@ if($git) {
         logit "run git pull in curl";
         system("git pull 2>&1");
         $gitstat += $?;
-        logit "failed to update from curl git ($?), continue anyway" if ($?);
+        logit "failed to update from curl git ($?), continue anyway" if($?);
 
         # Set timestamp to the UTC the git update took place.
-        $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+        $timestamp = scalar(gmtime)." UTC" if(!$gitstat);
     }
 
     # get the last 5 commits for show (even if no pull was made)
@@ -442,10 +442,10 @@ if($git) {
             logit "run git pull in ares";
             system("git pull 2>&1");
             $gitstat += $?;
-            logit "failed to update from ares git ($?), continue anyway" if ($?);
+            logit "failed to update from ares git ($?), continue anyway" if($?);
 
             # Set timestamp to the UTC the git update took place.
-            $timestamp = scalar(gmtime)." UTC" if (!$gitstat);
+            $timestamp = scalar(gmtime)." UTC" if(!$gitstat);
         }
 
         # get the last 5 commits for show (even if no pull was made)
@@ -535,7 +535,7 @@ sub findinpath {
     my @pa = split($s, $p);
     for $c (@_) {
         for $e (@pa) {
-            if( -x "$e/$c$x") {
+            if(-x "$e/$c$x") {
                 return $c;
             }
         }
@@ -547,7 +547,7 @@ if(!$make) {
     mydie "Couldn't find make in the PATH";
 }
 # force to 'nmake' for VC builds
-$make = "nmake" if ($targetos =~ /vc/);
+$make = "nmake" if($targetos =~ /vc/);
 logit "going with $make as make";
 
 # change to build dir
@@ -683,7 +683,7 @@ if(!$crosscompile || (($extvercmd ne '') && (-x $extvercmd))) {
     open($f, "<", $cmd);
     while(<$f>) {
         # strip CR from output on non-Windows platforms (WINE on Linux)
-        s/\r// if ($^O ne 'MSWin32');
+        s/\r// if($^O ne 'MSWin32');
         print;
     }
     close($f);