mirror of
https://github.com/curl/curl.git
synced 2026-04-15 00:01:41 +03:00
tidy-up: miscellaneous
- apply more clang-format. - lib/version: use `CURL_ARRAYSIZE()`. - INSTALL-CMAKE.md: sync-up an option description with others. - examples: delete unused main args. - examples/ftpgetinfo: document `_CRT_SECURE_NO_WARNINGS` symbol. - delete remaining stray duplicate lines. - acinclude.m4: drop an unnecessary x-hack. - vtls/mbedtls: join a URL split into two lines. - src/tool_cb_see: add parentheses around macro expressions. - src/tool_operate: move literals to the right side of comparisons. - libtests: sync up fopen/fstat error messages between tests. - curl_setup.h: replace `if ! defined __LP64` with `ifndef __LP64`. I assume it makes no difference on Tandem systems, as the latter form is already used in `include/curl/system.h`. Closes #20018
This commit is contained in:
parent
cd9da30e76
commit
308c347c8b
53 changed files with 988 additions and 1005 deletions
|
|
@ -52,7 +52,7 @@ static CURLcode test_lib505(const char *URL)
|
|||
|
||||
hd_src = curlx_fopen(libtest_arg2, "rb");
|
||||
if(!hd_src) {
|
||||
curl_mfprintf(stderr, "fopen failed with error (%d) %s\n",
|
||||
curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static CURLcode test_lib525(const char *URL)
|
|||
|
||||
hd_src = curlx_fopen(libtest_arg2, "rb");
|
||||
if(!hd_src) {
|
||||
curl_mfprintf(stderr, "fopen failed with error (%d) %s\n",
|
||||
curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
return TEST_ERR_FOPEN;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ static CURLcode test_lib541(const char *URL)
|
|||
|
||||
hd_src = curlx_fopen(libtest_arg2, "rb");
|
||||
if(!hd_src) {
|
||||
curl_mfprintf(stderr, "fopen failed with error (%d) %s\n",
|
||||
curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
return TEST_ERR_MAJOR_BAD; /* if this happens things are major weird */
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ static CURLcode test_lib568(const char *URL)
|
|||
{
|
||||
CURLcode result;
|
||||
CURL *curl;
|
||||
char errbuf[STRERROR_LEN];
|
||||
int sdp;
|
||||
FILE *sdpf = NULL;
|
||||
struct_stat file_info;
|
||||
|
|
@ -67,7 +68,9 @@ static CURLcode test_lib568(const char *URL)
|
|||
|
||||
sdp = curlx_open(libtest_arg2, O_RDONLY);
|
||||
if(sdp == -1) {
|
||||
curl_mfprintf(stderr, "cannot open %s\n", libtest_arg2);
|
||||
curl_mfprintf(stderr, "open() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
|
@ -76,7 +79,9 @@ static CURLcode test_lib568(const char *URL)
|
|||
|
||||
sdpf = curlx_fopen(libtest_arg2, "rb");
|
||||
if(!sdpf) {
|
||||
curl_mfprintf(stderr, "cannot fopen %s\n", libtest_arg2);
|
||||
curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ static CURLcode test_lib572(const char *URL)
|
|||
{
|
||||
CURLcode result;
|
||||
CURL *curl;
|
||||
char errbuf[STRERROR_LEN];
|
||||
int params;
|
||||
FILE *paramsf = NULL;
|
||||
struct_stat file_info;
|
||||
|
|
@ -85,7 +86,9 @@ static CURLcode test_lib572(const char *URL)
|
|||
/* PUT style GET_PARAMETERS */
|
||||
params = curlx_open(libtest_arg2, O_RDONLY);
|
||||
if(params == -1) {
|
||||
curl_mfprintf(stderr, "cannot open %s\n", libtest_arg2);
|
||||
curl_mfprintf(stderr, "open() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
|
@ -94,7 +97,9 @@ static CURLcode test_lib572(const char *URL)
|
|||
|
||||
paramsf = curlx_fopen(libtest_arg2, "rb");
|
||||
if(!paramsf) {
|
||||
curl_mfprintf(stderr, "cannot fopen %s\n", libtest_arg2);
|
||||
curl_mfprintf(stderr, "fopen() failed with error (%d) %s\n",
|
||||
errno, curlx_strerror(errno, errbuf, sizeof(errbuf)));
|
||||
curl_mfprintf(stderr, "Error opening file '%s'\n", libtest_arg2);
|
||||
result = TEST_ERR_MAJOR_BAD;
|
||||
goto test_cleanup;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -264,7 +264,7 @@ my @toolhelp; # store all parsed parameters
|
|||
while(<$r>) {
|
||||
chomp;
|
||||
my $l= $_;
|
||||
if(/^ \{\" *(.*)/) {
|
||||
if(/^ \{ \" *(.*)/) {
|
||||
my $str=$1;
|
||||
my $combo;
|
||||
if($str =~ /^-(.), --([a-z0-9.-]*)/) {
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ static CURLcode test_unit1664(const char *arg)
|
|||
i, orgline, rc, (int)(line - orgline));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
static const char *single[] = {
|
||||
"a",
|
||||
|
|
@ -169,6 +170,7 @@ static CURLcode test_unit1664(const char *arg)
|
|||
i, orgline, rc, (int)(line - orgline));
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
static const char *nums[] = {
|
||||
"1",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue