tidy-up: miscellaneous

- curl_ntlm_core, smtp, schannel: fix comments.
- curl_setup.h: fix to undef before define.
- tool_doswin, server/sockfilt: reduce variables scopes.
- tool_doswin: drop an interim variable.
- windows: replace `SOCKET_ERROR` with `0` to align with rest of code.
- libssh2: rename variable to align with rest of code.
- gtls, unit1398: use `#if 0`.
- curl_trc.h, curlx/inet_ntop.h: add missing parentheses in macro
  expressions.
- ldap.c: set empty macro to `do {} while(0)`.
- examples/crawler: rename a non-CURLcode `result` variable.
- CURLINFO_TLS_SESSION: drop stray colon.
- add `const` to casts where missing.
- drop unnecessary parentheses.
- fix indent.
- quote style.
- comment style.
- whitespace, newlines, fold/unfold.

Closes #20554
This commit is contained in:
Viktor Szakats 2026-02-01 01:56:43 +01:00
parent 2a92c39a21
commit 61df5f466c
No known key found for this signature in database
88 changed files with 503 additions and 503 deletions

View file

@ -749,13 +749,13 @@ static int myssh_in_AUTHLIST(struct Curl_easy *data,
if(sshc->auth_methods)
infof(data, "SSH authentication methods available: %s%s%s%s",
sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY ?
"public key, ": "",
"public key, " : "",
sshc->auth_methods & SSH_AUTH_METHOD_GSSAPI_MIC ?
"GSSAPI, " : "",
sshc->auth_methods & SSH_AUTH_METHOD_INTERACTIVE ?
"keyboard-interactive, " : "",
sshc->auth_methods & SSH_AUTH_METHOD_PASSWORD ?
"password": "");
"password" : "");
/* For public key auth we need either the private key or
CURLSSH_AUTH_AGENT. */
if((sshc->auth_methods & SSH_AUTH_METHOD_PUBLICKEY) &&

View file

@ -699,10 +699,10 @@ static CURLcode ssh_force_knownhost_key_type(struct Curl_easy *data,
rc = libssh2_session_method_pref(sshc->ssh_session,
LIBSSH2_METHOD_HOSTKEY, hostkey_method);
if(rc) {
char *errmsg = NULL;
char *err_msg = NULL;
int errlen;
libssh2_session_last_error(sshc->ssh_session, &errmsg, &errlen, 0);
failf(data, "libssh2 method '%s' failed: %s", hostkey_method, errmsg);
libssh2_session_last_error(sshc->ssh_session, &err_msg, &errlen, 0);
failf(data, "libssh2 method '%s' failed: %s", hostkey_method, err_msg);
result = libssh2_session_error_to_CURLE(rc);
}
}