tidy-up: docs, comments, typos, whitespace

- GHA/windows: mention `IgnoreStandardErrorWarningFormat=true`
  in comment.
- cmake: fix MIT/GNU GSS order in messages.
- drop some exclamation marks from messages.
- drop redundant ending newlines from messages.
- fold/unfold where possible.
- fix indent, whitespace, typos and other nits.

Closes #22185
This commit is contained in:
Viktor Szakats 2026-06-15 14:33:20 +02:00
parent 15bd6c5d4c
commit 397b8f0ec6
No known key found for this signature in database
47 changed files with 157 additions and 150 deletions

View file

@ -73,8 +73,8 @@ bool Curl_creds_equal(struct Curl_creds *c1, struct Curl_creds *c2);
/* Provides properties for creds or, if creds is NULL, the empty string */
#define Curl_creds_has_user(c) ((c) && (c)->user[0])
#define Curl_creds_has_passwd(c) ((c) && (c)->passwd[0])
#define Curl_creds_has_user_or_pass(c) \
((c) && ((c)->user[0] || (c)->passwd[0]))
#define Curl_creds_has_user_or_pass(c) \
((c) && ((c)->user[0] || (c)->passwd[0]))
#define Curl_creds_has_oauth_bearer(c) ((c) && (c)->oauth_bearer[0])
#define Curl_creds_has_sasl_service(c) ((c) && (c)->sasl_service[0])
#define Curl_creds_user(c) ((c) ? (c)->user : "")

View file

@ -24,24 +24,24 @@
#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#include <netinet/in.h>
#endif
#ifdef HAVE_NETINET_IN6_H
# include <netinet/in6.h>
#include <netinet/in6.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#include <netdb.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#include <arpa/inet.h>
#endif
#ifdef HAVE_SYS_UN_H
# include <sys/un.h>
#include <sys/un.h>
#endif
#ifdef __VMS
# include <in.h>
# include <inet.h>
#include <in.h>
#include <inet.h>
#endif
#include <stddef.h> /* for offsetof() */

View file

@ -957,7 +957,7 @@ struct timeval {
(RECV_TYPE_ARG4)(0))
#else /* HAVE_RECV */
#ifndef sread
#error "Missing definition of macro sread!"
#error "Missing definition of macro sread"
#endif
#endif /* HAVE_RECV */
@ -980,7 +980,7 @@ struct timeval {
#endif /* SEND_NONCONST_ARG2 */
#else /* HAVE_SEND */
#ifndef swrite
#error "Missing definition of macro swrite!"
#error "Missing definition of macro swrite"
#endif
#endif /* HAVE_SEND */
@ -1194,7 +1194,7 @@ typedef unsigned int curl_bit;
*/
#if defined(__LWIP_OPT_H__) || defined(LWIP_HDR_OPT_H)
# if defined(SOCKET) || defined(USE_WINSOCK)
# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
# error "Winsock and lwIP TCP/IP stack definitions shall not coexist"
# endif
#endif

View file

@ -186,7 +186,7 @@ static void free_formlist(struct FormInfo *ptr)
* curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",
* CURLFORM_PTRCONTENTS, ptr, CURLFORM_CONTENTSLENGTH, 10L,
* CURLFORM_END);
* (if CURLFORM_CONTENTSLENGTH is missing strlen () is used)
* (if CURLFORM_CONTENTSLENGTH is missing strlen() is used)
*
* storing a filename (CONTENTTYPE is optional!):
* curl_formadd(&post, &last, CURLFORM_COPYNAME, "name",

View file

@ -52,7 +52,7 @@
#define TIMESTAMP_SIZE 17
/* hex-encoded with trailing null */
/* hex-encoded with null-terminator */
#define SHA256_HEX_LENGTH ((2 * CURL_SHA256_DIGEST_LENGTH) + 1)
#define MAX_QUERY_COMPONENTS 128

View file

@ -24,31 +24,31 @@
#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#include <netinet/in.h>
#endif
#ifdef HAVE_ARPA_INET_H
# include <arpa/inet.h>
#include <arpa/inet.h>
#endif
#ifdef HAVE_NET_IF_H
# include <net/if.h>
#include <net/if.h>
#endif
#ifdef HAVE_SYS_IOCTL_H
# include <sys/ioctl.h>
#include <sys/ioctl.h>
#endif
#ifdef HAVE_NETDB_H
# include <netdb.h>
#include <netdb.h>
#endif
#ifdef HAVE_SYS_SOCKIO_H
# include <sys/sockio.h>
#include <sys/sockio.h>
#endif
#ifdef HAVE_IFADDRS_H
# include <ifaddrs.h>
#include <ifaddrs.h>
#endif
#ifdef HAVE_STROPTS_H
# include <stropts.h>
#include <stropts.h>
#endif
#ifdef __VMS
# include <inet.h>
#include <inet.h>
#endif
#include "curlx/inet_ntop.h"

View file

@ -37,7 +37,7 @@
#include "curlx/multibyte.h"
/*
* Helper sspi error functions.
* Helper SSPI error functions.
*/
static int check_sspi_err(struct Curl_easy *data,
SECURITY_STATUS status,

View file

@ -51,7 +51,7 @@
#endif
#ifndef HAVE_SOCKET
#error "We cannot compile without socket() support!"
#error "We cannot compile without socket() support"
#endif
#include "urldata.h"

View file

@ -55,7 +55,7 @@
#endif
#ifndef HAVE_SOCKET
#error "We cannot compile without socket() support!"
#error "We cannot compile without socket() support"
#endif
#if defined(HAVE_IF_NAMETOINDEX) && defined(USE_WINSOCK)

View file

@ -1764,7 +1764,7 @@ static CURLUcode set_url(CURLU *u, const char *url, size_t part_size,
/* if the old URL is incomplete (we cannot get an absolute URL in
'oldurl'), replace the existing with the new.
Always include "scheme://" to make the URL "complete" */
uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags& ~CURLU_NO_GUESS_SCHEME);
uc = curl_url_get(u, CURLUPART_URL, &oldurl, flags & ~CURLU_NO_GUESS_SCHEME);
if(uc == CURLUE_OUT_OF_MEMORY)
return uc;
else if(uc)

View file

@ -37,7 +37,7 @@
#define DEFAULT_CONNCACHE_SIZE 5
/* length of longest IPv6 address string including the trailing null */
/* length of longest IPv6 address string including the null-terminator */
#define MAX_IPADR_LEN sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
/* Max string input length is a precaution against abuse and to detect junk

View file

@ -33,7 +33,7 @@
* <winldap.h>, <iphlpapi.h>, or something else, <wincrypt.h> does this:
* #define X509_NAME ((LPCSTR)7)
*
* In AWC-LC/BoringSSL's <openssl/base.h> there is:
* In AWS-LC/BoringSSL's <openssl/base.h> there is:
* typedef struct X509_name_st X509_NAME;
* etc.
*