mirror of
https://github.com/curl/curl.git
synced 2026-07-10 08:37:21 +03:00
tidy-up: syntax and code nits
- cmp-pkg-config.sh: replace `-r -f` with `-rf` to match rest of repo. - configure.ac: add double quotes for robustness (not a bug). - curl-openssl.m4: merge nested `if`s. - CurlTests.c: drop `!= 0`, also to sync with m4. - CurlTests.c: replace `example.com` with `localhost` in `gethostbyname()` feature test code. (compile-only, not a bug) - GHA/http3-linux: drop literal `true` from bool expression. - lib650: drop redundant `&`. - move variable/call to left-hand side of equality checks, where missing. - perl: detach `<`/`>` from filename in `open()`, where missing. - schannel: apply two nit fixes lost in rebase. - scripts/verify-release: drop redundant double quotes. - scripts/verify-release: exit with error code on error. - synctime: replace magic numbers with `sizeof()`. - telnet: add missing parentheses to macro value. - tests/Makefile.am: use single quotes. - tool_operate: drop redundant `break` after `return` in VMS code. - unit2413: drop unused NULL pointer + free call. - unit2413: fix duplicate test case name. - urlapi: drop redundant parentheses. - urlapi: drop `CURL_UNCONST()` that became redundant. Closes #22186
This commit is contained in:
parent
a36384ab94
commit
84c5dcdb05
31 changed files with 100 additions and 102 deletions
|
|
@ -149,7 +149,7 @@ sub sourcecode {
|
|||
my $flags = 0;
|
||||
my @lines;
|
||||
my $line;
|
||||
open(F, "<$f");
|
||||
open(F, "<", $f);
|
||||
while(<F>) {
|
||||
my $l = $_;
|
||||
($state, $flags, $line) = srcline($state, $flags, $l);
|
||||
|
|
@ -175,7 +175,7 @@ my %wl;
|
|||
my @w;
|
||||
my @exact;
|
||||
my $file = shift @ARGV;
|
||||
open(CONFIG, "<$file") or die "Cannot open '$file': $!";
|
||||
open(CONFIG, "<", $file) or die "Cannot open '$file': $!";
|
||||
while(<CONFIG>) {
|
||||
chomp;
|
||||
if($_ =~ /^#/) {
|
||||
|
|
@ -261,7 +261,7 @@ sub highlight {
|
|||
sub document {
|
||||
my ($f) = @_;
|
||||
my @lines;
|
||||
open(F, "<$f");
|
||||
open(F, "<", $f);
|
||||
while(<F>) {
|
||||
push @lines, $_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -212,7 +212,7 @@ HEAD
|
|||
close(F);
|
||||
|
||||
if($inplace) {
|
||||
open(O, ">$f") or return 1;
|
||||
open(O, ">", $f) or return 1;
|
||||
print O @desc;
|
||||
close(O);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1047,7 +1047,7 @@ sub header {
|
|||
sub sourcecategories {
|
||||
my ($dir) = @_;
|
||||
my %cats;
|
||||
open(H, "<$dir/../../src/tool_help.h") or
|
||||
open(H, "<", "$dir/../../src/tool_help.h") or
|
||||
die "cannot find the header file";
|
||||
while(<H>) {
|
||||
if(/^\#define CURLHELP_([A-Z0-9]*)/) {
|
||||
|
|
|
|||
|
|
@ -257,7 +257,7 @@ sub sha256 {
|
|||
|
||||
sub oldhash {
|
||||
my $hash = "";
|
||||
open(C, "<$_[0]") or return 0;
|
||||
open(C, "<", $_[0]) or return 0;
|
||||
while(<C>) {
|
||||
chomp;
|
||||
if($_ =~ /^\#\# SHA256: (.*)/) {
|
||||
|
|
|
|||
|
|
@ -39,14 +39,14 @@ tarball="${1:-}"
|
|||
|
||||
if [ -z "$tarball" ]; then
|
||||
echo "Provide a curl release tarball name as argument"
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
|
||||
i="$(find . -maxdepth 1 -type d -name 'curl-*' | wc -l)"
|
||||
|
||||
if test "$i" -gt 1; then
|
||||
echo "multiple curl-* entries found, disambiguate please"
|
||||
exit
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# check if this is in a git clone directory
|
||||
|
|
@ -115,7 +115,7 @@ else
|
|||
mv "$f" _tarballs/
|
||||
done
|
||||
fi
|
||||
cd "_tarballs"
|
||||
cd _tarballs
|
||||
|
||||
# compare the new tarball against the original
|
||||
sha256sum -c checksum
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue