mirror of
https://github.com/curl/curl.git
synced 2026-08-26 11:43:32 +03:00
tidy-up: miscellaneous
- fix typos. - badword: add two new words. - cpp: drop parentheses from standalone `#if` expressions. - libssh: vertical-align comment block with others. - clang-format. Closes #21880
This commit is contained in:
parent
982e19f231
commit
d3e9a815c4
31 changed files with 246 additions and 252 deletions
|
|
@ -587,7 +587,7 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#if (SIZEOF_CURL_OFF_T < 8)
|
||||
#if SIZEOF_CURL_OFF_T < 8
|
||||
#error "too small curl_off_t"
|
||||
#else
|
||||
/* assume SIZEOF_CURL_OFF_T == 8 */
|
||||
|
|
@ -598,7 +598,7 @@
|
|||
#define FMT_OFF_T CURL_FORMAT_CURL_OFF_T
|
||||
#define FMT_OFF_TU CURL_FORMAT_CURL_OFF_TU
|
||||
|
||||
#if (SIZEOF_TIME_T == 4)
|
||||
#if SIZEOF_TIME_T == 4
|
||||
# ifdef HAVE_TIME_T_UNSIGNED
|
||||
# define TIME_T_MAX UINT_MAX
|
||||
# define TIME_T_MIN 0
|
||||
|
|
|
|||
|
|
@ -244,7 +244,7 @@ static int parse_flags(const char **fmtp, unsigned int *flagsp, int use_dollar,
|
|||
fmt += 2;
|
||||
}
|
||||
else {
|
||||
#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG)
|
||||
#if SIZEOF_CURL_OFF_T > SIZEOF_LONG
|
||||
flags |= FLAGS_LONGLONG;
|
||||
#else
|
||||
flags |= FLAGS_LONG;
|
||||
|
|
@ -267,14 +267,14 @@ static int parse_flags(const char **fmtp, unsigned int *flagsp, int use_dollar,
|
|||
case 'z':
|
||||
/* the code below generates a warning if -Wunreachable-code is
|
||||
used */
|
||||
#if (SIZEOF_SIZE_T > SIZEOF_LONG)
|
||||
#if SIZEOF_SIZE_T > SIZEOF_LONG
|
||||
flags |= FLAGS_LONGLONG;
|
||||
#else
|
||||
flags |= FLAGS_LONG;
|
||||
#endif
|
||||
break;
|
||||
case 'O':
|
||||
#if (SIZEOF_CURL_OFF_T > SIZEOF_LONG)
|
||||
#if SIZEOF_CURL_OFF_T > SIZEOF_LONG
|
||||
flags |= FLAGS_LONGLONG;
|
||||
#else
|
||||
flags |= FLAGS_LONG;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ static CURLcode capsule_cf_send(struct Curl_cfilter *cf,
|
|||
ctx->pending_offset += nwritten;
|
||||
if(ctx->pending_offset < ctx->pending_len)
|
||||
return CURLE_AGAIN;
|
||||
/* pending capsule has been fully flusehd */
|
||||
/* pending capsule has been fully flushed */
|
||||
*pnwritten = ctx->pending_payload;
|
||||
curlx_safefree(ctx->pending);
|
||||
return CURLE_OK;
|
||||
|
|
|
|||
|
|
@ -3161,23 +3161,23 @@ void Curl_ssh_version(char *buffer, size_t buflen)
|
|||
* SCP.
|
||||
*/
|
||||
const struct Curl_protocol Curl_protocol_scp = {
|
||||
myssh_setup_connection, /* setup_connection */
|
||||
myssh_do_it, /* do_it */
|
||||
scp_done, /* done */
|
||||
ZERO_NULL, /* do_more */
|
||||
myssh_connect, /* connect_it */
|
||||
myssh_multi_statemach, /* connecting */
|
||||
scp_doing, /* doing */
|
||||
myssh_pollset, /* proto_pollset */
|
||||
myssh_pollset, /* doing_pollset */
|
||||
ZERO_NULL, /* domore_pollset */
|
||||
myssh_pollset, /* perform_pollset */
|
||||
scp_disconnect, /* disconnect */
|
||||
ZERO_NULL, /* write_resp */
|
||||
ZERO_NULL, /* write_resp_hd */
|
||||
ZERO_NULL, /* connection_is_dead */
|
||||
ZERO_NULL, /* attach connection */
|
||||
ZERO_NULL, /* follow */
|
||||
myssh_setup_connection, /* setup_connection */
|
||||
myssh_do_it, /* do_it */
|
||||
scp_done, /* done */
|
||||
ZERO_NULL, /* do_more */
|
||||
myssh_connect, /* connect_it */
|
||||
myssh_multi_statemach, /* connecting */
|
||||
scp_doing, /* doing */
|
||||
myssh_pollset, /* proto_pollset */
|
||||
myssh_pollset, /* doing_pollset */
|
||||
ZERO_NULL, /* domore_pollset */
|
||||
myssh_pollset, /* perform_pollset */
|
||||
scp_disconnect, /* disconnect */
|
||||
ZERO_NULL, /* write_resp */
|
||||
ZERO_NULL, /* write_resp_hd */
|
||||
ZERO_NULL, /* connection_is_dead */
|
||||
ZERO_NULL, /* attach connection */
|
||||
ZERO_NULL, /* follow */
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -3586,7 +3586,7 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
|
|||
#ifdef CURL_LIBSSH2_DEBUG
|
||||
libssh2_trace(sshc->ssh_session, ~0);
|
||||
infof(data, "SSH socket: %d", (int)sock);
|
||||
#endif /* CURL_LIBSSH2_DEBUG */
|
||||
#endif
|
||||
|
||||
myssh_to(data, sshc, SSH_INIT);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue