tidy-up: miscellaneous

- examples: sync debug output printf masks.
- INSTALL-CMAKE.md: tidy up section for some options.
- curl_sha512_256: delete comment suggesting an optimization.
- vtls/keylog: scope a variable.
- vtls/openssl: make a source code URL a permalink.
- vtls/schannel: drop redundant parentheses.
- test1119.pl: robustify `$1` -> `$s`.
- sync arg names in comments to match the code.
- tidy up and minor fixes to comments.
- fix formatting/indenting/comment/newline/include nits.
- move `UNITTEST` protos next to definitions, sync their argument names.
- make variables static.
- add parentheses to Perl `open()` calls.
- drop unnecessary double quotes in Perl.
- clang-format.

Closes #21000
This commit is contained in:
Viktor Szakats 2026-03-09 12:27:12 +01:00
parent 3512b673dd
commit e0dd6eb4a4
No known key found for this signature in database
148 changed files with 612 additions and 684 deletions

View file

@ -307,7 +307,7 @@ static CURLcode ftp_parse_url_path(struct Curl_easy *data,
ftpc->file = fileName;
else
ftpc->file = NULL; /* instead of point to a zero byte,
we make it a NULL pointer */
we make it a NULL pointer */
if(data->state.upload && !ftpc->file && (ftp->transfer == PPTRANSFER_BODY)) {
/* We need a filename when uploading. Return error! */
@ -1686,17 +1686,17 @@ static CURLcode ftp_state_ul_setup(struct Curl_easy *data,
if((data->state.resume_from && !sizechecked) ||
((data->state.resume_from > 0) && sizechecked)) {
/* we are about to continue the uploading of a file */
/* 1. get already existing file's size. We use the SIZE command for this
which may not exist in the server! The SIZE command is not in
RFC959. */
/* we are about to continue the uploading of a file
1. get already existing file's size. We use the SIZE command for this
which may not exist in the server! The SIZE command is not in
RFC959.
/* 2. This used to set REST, but since we can do append, we issue no
another ftp command. Skip the source file offset and APPEND the rest on
the file instead */
2. This used to set REST, but since we can do append, we issue no
another ftp command. Skip the source file offset and APPEND the rest
on the file instead
/* 3. pass file-size number of bytes in the source file */
/* 4. lower the infilesize counter */
3. pass file-size number of bytes in the source file
4. lower the infilesize counter */
/* => transfer as usual */
int seekerr = CURL_SEEKFUNC_OK;
@ -2507,7 +2507,6 @@ static bool twodigit(const char *p, int *val)
/*
* Unittest @1668
*/
UNITTEST bool ftp_213_date(const char *p, int *year, int *month, int *day,
int *hour, int *minute, int *second);
UNITTEST bool ftp_213_date(const char *p, int *year, int *month, int *day,
@ -3888,12 +3887,12 @@ static CURLcode ftp_nb_type(struct Curl_easy *data,
* This is the actual DO function for FTP. Get a file/directory according to
* the options previously setup.
*/
static
CURLcode ftp_perform(struct Curl_easy *data,
struct ftp_conn *ftpc,
struct FTP *ftp,
bool *connected, /* connect status after PASV / PORT */
bool *dophase_done)
static CURLcode ftp_perform(
struct Curl_easy *data,
struct ftp_conn *ftpc,
struct FTP *ftp,
bool *connected, /* connect status after PASV / PORT */
bool *dophase_done)
{
/* this is FTP and no proxy */
CURLcode result = CURLE_OK;