mirror of
https://github.com/curl/curl.git
synced 2026-08-03 17:30:30 +03:00
tidy-up: miscellaneous
- badwords: replace stray synonyms with 'null-terminator'. - tests/FILEFORMAT.md: tidy up feature descriptions. - printf: replace stray `%i` masks with `%d` for consistency. - pytest: add comments for empty excepts to try silencing GitHub CodeQL warnings. - tool1394, unit1675: merge nested `if`s. - dnscache: fix typo in comment. - fix whitespace, indent and newlines. Closes #21921
This commit is contained in:
parent
849317ff5c
commit
952b04474c
31 changed files with 90 additions and 90 deletions
|
|
@ -117,12 +117,10 @@ static CURLcode test_unit1655(const char *arg)
|
|||
fail_unless(victim.canary3 == 41,
|
||||
"three-byte buffer overwrite has happened");
|
||||
}
|
||||
else {
|
||||
if(d == DOH_OK) {
|
||||
fail_unless(olen <= sizeof(victim.dohbuffer),
|
||||
"wrote outside bounds");
|
||||
fail_unless(olen > strlen(name), "unrealistic low size");
|
||||
}
|
||||
else if(d == DOH_OK) {
|
||||
fail_unless(olen <= sizeof(victim.dohbuffer),
|
||||
"wrote outside bounds");
|
||||
fail_unless(olen > strlen(name), "unrealistic low size");
|
||||
}
|
||||
}
|
||||
} while(0);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ static CURLcode test_unit1675(const char *arg)
|
|||
{
|
||||
UNITTEST_BEGIN_SIMPLE
|
||||
|
||||
/* Test ipv4_normalize */
|
||||
/* Test ipv4_normalize */
|
||||
{
|
||||
struct dynbuf host;
|
||||
int fails = 0;
|
||||
|
|
@ -123,13 +123,11 @@ static CURLcode test_unit1675(const char *arg)
|
|||
fails++;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(rc == HOST_IPV4) {
|
||||
curl_mfprintf(stderr, "ipv4_normalize('%s') succeeded unexpectedly:"
|
||||
" got '%s'\n",
|
||||
tests[i].in, curlx_dyn_ptr(&host));
|
||||
fails++;
|
||||
}
|
||||
else if(rc == HOST_IPV4) {
|
||||
curl_mfprintf(stderr, "ipv4_normalize('%s') succeeded unexpectedly:"
|
||||
" got '%s'\n",
|
||||
tests[i].in, curlx_dyn_ptr(&host));
|
||||
fails++;
|
||||
}
|
||||
}
|
||||
curlx_dyn_free(&host);
|
||||
|
|
@ -238,12 +236,10 @@ static CURLcode test_unit1675(const char *arg)
|
|||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if(!uc) {
|
||||
curl_mfprintf(stderr, "ipv6_parse('%s') succeeded unexpectedly\n",
|
||||
tests[i].in);
|
||||
fails++;
|
||||
}
|
||||
else if(!uc) {
|
||||
curl_mfprintf(stderr, "ipv6_parse('%s') succeeded unexpectedly\n",
|
||||
tests[i].in);
|
||||
fails++;
|
||||
}
|
||||
curlx_free(u.host);
|
||||
curlx_free(u.zoneid);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue