]> git.feebdaed.xyz Git - 0xmirror/curl.git/commitdiff
tidy-up: miscellaneous
authorViktor Szakats <commit@vsz.me>
Sat, 20 Dec 2025 13:32:49 +0000 (14:32 +0100)
committerViktor Szakats <commit@vsz.me>
Fri, 26 Dec 2025 21:06:09 +0000 (22:06 +0100)
- asyn-thrdd.c: scope an include.
- apply more clang-format suggestions.
- tidy-up PP guard comments.
- delete empty line from the top of headers.
- add empty line after `curl_setup.h` include where missing.
- fix indent.
- CODE_STYLE.md: add `strcpy`.
  Follow-up to 8636ad55dfbdbcc2809a61e65c3511baf5e7b0e8 #20088
- lib1901.c: drop unnecessary line.
  Follow-up to 436e67f65b9dee1e80aa063c39450f0d1df6ac72 #20076

Closes #20070

314 files changed:
docs/internals/CLIENT-WRITERS.md
docs/internals/CODE_STYLE.md
docs/libcurl/curl_formget.md
docs/libcurl/opts/CURLOPT_ALTSVC_CTRL.md
docs/libcurl/opts/CURLOPT_HSTS_CTRL.md
docs/libcurl/symbols.pl
include/curl/curl.h
include/curl/curlver.h
include/curl/header.h
include/curl/multi.h
include/curl/options.h
include/curl/urlapi.h
include/curl/websockets.h
lib/amigaos.c
lib/asyn-ares.c
lib/asyn-base.c
lib/asyn-thrdd.c
lib/asyn.h
lib/bufq.c
lib/bufref.c
lib/cf-h1-proxy.c
lib/cf-h1-proxy.h
lib/cf-h2-proxy.c
lib/cf-h2-proxy.h
lib/cf-haproxy.c
lib/cf-haproxy.h
lib/cf-https-connect.c
lib/cf-ip-happy.c
lib/cf-socket.c
lib/cfilters.c
lib/cfilters.h
lib/conncache.c
lib/conncache.h
lib/connect.c
lib/content_encoding.c
lib/cookie.c
lib/cshutdn.c
lib/cshutdn.h
lib/curl_addrinfo.c
lib/curl_addrinfo.h
lib/curl_endian.c
lib/curl_fnmatch.c
lib/curl_fnmatch.h
lib/curl_fopen.c
lib/curl_fopen.h
lib/curl_get_line.c
lib/curl_get_line.h
lib/curl_gethostname.c
lib/curl_gssapi.c
lib/curl_gssapi.h
lib/curl_md4.h
lib/curl_memrchr.c
lib/curl_memrchr.h
lib/curl_ntlm_core.c
lib/curl_ntlm_core.h
lib/curl_range.c
lib/curl_range.h
lib/curl_rtmp.c
lib/curl_sasl.c
lib/curl_sasl.h
lib/curl_sha256.h
lib/curl_sha512_256.c
lib/curl_sha512_256.h
lib/curl_share.c
lib/curl_share.h
lib/curl_sspi.c
lib/curl_sspi.h
lib/curl_threads.c
lib/curl_trc.c
lib/curl_trc.h
lib/curlx/dynbuf.c
lib/curlx/fopen.c
lib/curlx/fopen.h
lib/curlx/inet_ntop.c
lib/curlx/inet_ntop.h
lib/curlx/inet_pton.c
lib/curlx/inet_pton.h
lib/curlx/multibyte.c
lib/curlx/nonblock.c
lib/curlx/strcopy.c
lib/curlx/strerr.c
lib/curlx/strparse.c
lib/curlx/timediff.c
lib/curlx/timediff.h
lib/curlx/timeval.c
lib/curlx/timeval.h
lib/curlx/version_win32.c
lib/curlx/version_win32.h
lib/curlx/wait.c
lib/curlx/wait.h
lib/curlx/warnless.c
lib/curlx/warnless.h
lib/cw-out.c
lib/cw-out.h
lib/cw-pause.c
lib/cw-pause.h
lib/dict.c
lib/dict.h
lib/dllmain.c
lib/doh.c
lib/doh.h
lib/dynhds.c
lib/easy.c
lib/easy_lock.h
lib/easygetopt.c
lib/easyif.h
lib/easyoptions.h
lib/escape.c
lib/fake_addrinfo.c
lib/fake_addrinfo.h
lib/file.c
lib/file.h
lib/fileinfo.c
lib/fileinfo.h
lib/formdata.c
lib/formdata.h
lib/ftp.c
lib/ftp.h
lib/ftplistparser.c
lib/ftplistparser.h
lib/functypes.h
lib/getenv.c
lib/getinfo.c
lib/gopher.c
lib/gopher.h
lib/hash.c
lib/hash.h
lib/headers.c
lib/hmac.c
lib/hostip.c
lib/hostip.h
lib/hostip4.c
lib/hostip6.c
lib/http.c
lib/http1.c
lib/http1.h
lib/http2.c
lib/http2.h
lib/http_aws_sigv4.c
lib/http_chunks.c
lib/http_digest.c
lib/http_digest.h
lib/http_negotiate.c
lib/http_negotiate.h
lib/http_ntlm.c
lib/http_ntlm.h
lib/http_proxy.c
lib/http_proxy.h
lib/httpsrr.c
lib/httpsrr.h
lib/idn.c
lib/idn.h
lib/if2ip.c
lib/imap.c
lib/imap.h
lib/ldap.c
lib/llist.c
lib/llist.h
lib/macos.c
lib/macos.h
lib/md4.c
lib/md5.c
lib/memdebug.c
lib/mime.c
lib/mime.h
lib/mprintf.c
lib/mqtt.c
lib/mqtt.h
lib/multi.c
lib/multi_ev.c
lib/multi_ev.h
lib/multi_ntfy.c
lib/multi_ntfy.h
lib/multihandle.h
lib/multiif.h
lib/netrc.c
lib/netrc.h
lib/noproxy.c
lib/openldap.c
lib/parsedate.c
lib/parsedate.h
lib/pingpong.c
lib/pingpong.h
lib/pop3.c
lib/pop3.h
lib/progress.c
lib/progress.h
lib/psl.c
lib/psl.h
lib/rand.c
lib/rand.h
lib/ratelimit.c
lib/ratelimit.h
lib/request.c
lib/request.h
lib/rtsp.c
lib/rtsp.h
lib/select.c
lib/select.h
lib/sendf.c
lib/sendf.h
lib/setopt.c
lib/sha256.c
lib/slist.c
lib/smb.c
lib/smb.h
lib/smtp.c
lib/smtp.h
lib/sockaddr.h
lib/socketpair.c
lib/socketpair.h
lib/socks.c
lib/socks.h
lib/socks_gssapi.c
lib/socks_sspi.c
lib/splay.c
lib/strcase.c
lib/strcase.h
lib/strdup.c
lib/strequal.c
lib/strerror.c
lib/strerror.h
lib/system_win32.c
lib/system_win32.h
lib/telnet.c
lib/tftp.c
lib/transfer.c
lib/transfer.h
lib/uint-bset.c
lib/uint-hash.c
lib/uint-hash.h
lib/uint-spbset.c
lib/uint-table.c
lib/url.c
lib/urlapi.c
lib/urldata.h
lib/vauth/cleartext.c
lib/vauth/cram.c
lib/vauth/digest.c
lib/vauth/digest.h
lib/vauth/digest_sspi.c
lib/vauth/gsasl.c
lib/vauth/krb5_gssapi.c
lib/vauth/krb5_sspi.c
lib/vauth/ntlm.c
lib/vauth/ntlm_sspi.c
lib/vauth/oauth2.c
lib/vauth/spnego_gssapi.c
lib/vauth/spnego_sspi.c
lib/vauth/vauth.c
lib/vauth/vauth.h
lib/version.c
lib/vquic/curl_ngtcp2.c
lib/vquic/curl_ngtcp2.h
lib/vquic/curl_osslq.c
lib/vquic/curl_osslq.h
lib/vquic/curl_quiche.c
lib/vquic/curl_quiche.h
lib/vquic/vquic-tls.c
lib/vquic/vquic-tls.h
lib/vquic/vquic.c
lib/vquic/vquic.h
lib/vquic/vquic_int.h
lib/vssh/libssh.c
lib/vssh/libssh2.c
lib/vssh/ssh.h
lib/vssh/vssh.c
lib/vssh/vssh.h
lib/vtls/apple.h
lib/vtls/cipher_suite.c
lib/vtls/cipher_suite.h
lib/vtls/gtls.c
lib/vtls/gtls.h
lib/vtls/hostcheck.c
lib/vtls/hostcheck.h
lib/vtls/keylog.c
lib/vtls/mbedtls.c
lib/vtls/openssl.c
lib/vtls/openssl.h
lib/vtls/rustls.c
lib/vtls/rustls.h
lib/vtls/schannel.c
lib/vtls/schannel_verify.c
lib/vtls/vtls.h
lib/vtls/vtls_scache.c
lib/vtls/vtls_scache.h
lib/vtls/vtls_spack.c
lib/vtls/wolfssl.c
lib/vtls/x509asn1.c
lib/vtls/x509asn1.h
scripts/managen
src/curlinfo.c
src/slist_wc.c
src/slist_wc.h
src/tool_cfgable.h
src/tool_easysrc.h
src/tool_ipfs.h
src/tool_listhelp.c
src/tool_msgs.h
src/tool_operate.h
src/tool_operhlp.c
src/tool_progress.c
src/tool_setup.h
src/tool_stderr.c
src/tool_stderr.h
src/tool_writeout.h
src/tool_writeout_json.h
src/tool_xattr.c
src/var.h
tests/ftpserver.pl
tests/libtest/lib1308.c
tests/libtest/lib1901.c
tests/libtest/testutil.h
tests/unit/unit1658.c

index b07a562afbfb42d84915a7ff96eac9153dffa229..0e9bc843a756361c79beeece9fc23db583c99064 100644 (file)
@@ -36,13 +36,13 @@ CURLcode Curl_client_write(struct Curl_easy *data, int type, const char *buf, si
 The `type` argument specifies what the bytes in `buf` actually are.
 The following bits are defined:
 ```
-#define CLIENTWRITE_BODY    (1<<0) /* non-meta information, BODY */
-#define CLIENTWRITE_INFO    (1<<1) /* meta information, not a HEADER */
-#define CLIENTWRITE_HEADER  (1<<2) /* meta information, HEADER */
-#define CLIENTWRITE_STATUS  (1<<3) /* a special status HEADER */
-#define CLIENTWRITE_CONNECT (1<<4) /* a CONNECT related HEADER */
-#define CLIENTWRITE_1XX     (1<<5) /* a 1xx response related HEADER */
-#define CLIENTWRITE_TRAILER (1<<6) /* a trailer HEADER */
+#define CLIENTWRITE_BODY    (1 << 0) /* non-meta information, BODY */
+#define CLIENTWRITE_INFO    (1 << 1) /* meta information, not a HEADER */
+#define CLIENTWRITE_HEADER  (1 << 2) /* meta information, HEADER */
+#define CLIENTWRITE_STATUS  (1 << 3) /* a special status HEADER */
+#define CLIENTWRITE_CONNECT (1 << 4) /* a CONNECT related HEADER */
+#define CLIENTWRITE_1XX     (1 << 5) /* a 1xx response related HEADER */
+#define CLIENTWRITE_TRAILER (1 << 6) /* a trailer HEADER */
 ```
 
 The main types here are `CLIENTWRITE_BODY` and `CLIENTWRITE_HEADER`. They are
index ee5bdbb5629d9ecef259447b1ee38b26fb584bde..8be6592df5b866cb63c47fcd094ad0dd5d82c499 100644 (file)
@@ -393,6 +393,7 @@ This is the full list of functions generally banned.
     sscanf
     stat
     strcat
+    strcpy
     strdup
     strerror
     strncat
index 316609e93a97b912b3cd620cbd0a41dfe306d8fa..4c4726c315aa6780c3186d2019a7a8bbfdc03ff7 100644 (file)
@@ -54,7 +54,7 @@ This, because first then does libcurl known which actual read callback to use.
 size_t print_httppost_callback(void *arg, const char *buf, size_t len)
 {
   fwrite(buf, len, 1, stdout);
-  (*(size_t *)arg) += len;
+  *((size_t *)arg) += len;
   return len;
 }
 
index 84e5d6657c0297bd319b1c93f04d3ac505f1279e..cdf9ec44a45909dde5a800dbe60fe3a236a00b1a 100644 (file)
@@ -22,10 +22,10 @@ CURLOPT_ALTSVC_CTRL - control alt-svc behavior
 ~~~c
 #include <curl/curl.h>
 
-#define CURLALTSVC_READONLYFILE (1L<<2)
-#define CURLALTSVC_H1           (1L<<3)
-#define CURLALTSVC_H2           (1L<<4)
-#define CURLALTSVC_H3           (1L<<5)
+#define CURLALTSVC_READONLYFILE (1L << 2)
+#define CURLALTSVC_H1           (1L << 3)
+#define CURLALTSVC_H2           (1L << 4)
+#define CURLALTSVC_H3           (1L << 5)
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_ALTSVC_CTRL, long bitmask);
 ~~~
index 9026dddc153ec9fe560409863806afb50ecceba2..e432fc4edcf431cb7bfc770d46fcd933da93e17c 100644 (file)
@@ -23,8 +23,8 @@ CURLOPT_HSTS_CTRL - control HSTS behavior
 ~~~c
 #include <curl/curl.h>
 
-#define CURLHSTS_ENABLE       (1L<<0)
-#define CURLHSTS_READONLYFILE (1L<<1)
+#define CURLHSTS_ENABLE       (1L << 0)
+#define CURLHSTS_READONLYFILE (1L << 1)
 
 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_HSTS_CTRL, long bitmask);
 ~~~
index 1751a4887de9e9dddfc4e00d938967ed01cbb7f2..d20554ab9391304e3e0b1f0259dc9af76b3589a9 100755 (executable)
@@ -52,7 +52,7 @@ open F, "<symbols-in-versions";
 sub str2num {
     my ($str)=@_;
     if($str && $str =~ /([0-9]*)\.([0-9]*)\.*([0-9]*)/) {
-        return sprintf("0x%06x", $1 <<16 | $2 << 8 | ($3 || '0'));
+        return sprintf("0x%06x", $1 << 16 | $2 << 8 | ($3 || '0'));
     }
 }
 
index 250f3f679aab4df9c8ff631f9fdc014d3950e1a5..e755f098f2c8e4ad0696555ca35e2bef3404dac7 100644 (file)
@@ -202,22 +202,22 @@ struct curl_httppost {
   long flags;                       /* as defined below */
 
 /* specified content is a filename */
-#define CURL_HTTPPOST_FILENAME (1<<0)
+#define CURL_HTTPPOST_FILENAME (1 << 0)
 /* specified content is a filename */
-#define CURL_HTTPPOST_READFILE (1<<1)
+#define CURL_HTTPPOST_READFILE (1 << 1)
 /* name is only stored pointer do not free in formfree */
-#define CURL_HTTPPOST_PTRNAME (1<<2)
+#define CURL_HTTPPOST_PTRNAME (1 << 2)
 /* contents is only stored pointer do not free in formfree */
-#define CURL_HTTPPOST_PTRCONTENTS (1<<3)
+#define CURL_HTTPPOST_PTRCONTENTS (1 << 3)
 /* upload file from buffer */
-#define CURL_HTTPPOST_BUFFER (1<<4)
+#define CURL_HTTPPOST_BUFFER (1 << 4)
 /* upload file from pointer contents */
-#define CURL_HTTPPOST_PTRBUFFER (1<<5)
+#define CURL_HTTPPOST_PTRBUFFER (1 << 5)
 /* upload file contents by using the regular read callback to get the data and
    pass the given pointer as custom pointer */
-#define CURL_HTTPPOST_CALLBACK (1<<6)
+#define CURL_HTTPPOST_CALLBACK (1 << 6)
 /* use size in 'contentlen', added in 7.46.0 */
-#define CURL_HTTPPOST_LARGE (1<<7)
+#define CURL_HTTPPOST_LARGE (1 << 7)
 
   char *showfilename;               /* The filename to show. If not set, the
                                        actual filename will be used (if this
@@ -303,14 +303,14 @@ typedef enum {
   CURLFILETYPE_UNKNOWN /* should never occur */
 } curlfiletype;
 
-#define CURLFINFOFLAG_KNOWN_FILENAME    (1<<0)
-#define CURLFINFOFLAG_KNOWN_FILETYPE    (1<<1)
-#define CURLFINFOFLAG_KNOWN_TIME        (1<<2)
-#define CURLFINFOFLAG_KNOWN_PERM        (1<<3)
-#define CURLFINFOFLAG_KNOWN_UID         (1<<4)
-#define CURLFINFOFLAG_KNOWN_GID         (1<<5)
-#define CURLFINFOFLAG_KNOWN_SIZE        (1<<6)
-#define CURLFINFOFLAG_KNOWN_HLINKCOUNT  (1<<7)
+#define CURLFINFOFLAG_KNOWN_FILENAME    (1 << 0)
+#define CURLFINFOFLAG_KNOWN_FILETYPE    (1 << 1)
+#define CURLFINFOFLAG_KNOWN_TIME        (1 << 2)
+#define CURLFINFOFLAG_KNOWN_PERM        (1 << 3)
+#define CURLFINFOFLAG_KNOWN_UID         (1 << 4)
+#define CURLFINFOFLAG_KNOWN_GID         (1 << 5)
+#define CURLFINFOFLAG_KNOWN_SIZE        (1 << 6)
+#define CURLFINFOFLAG_KNOWN_HLINKCOUNT  (1 << 7)
 
 /* Information about a single file, used when doing FTP wildcard matching */
 struct curl_fileinfo {
@@ -826,34 +826,34 @@ typedef enum {
  */
 
 #define CURLAUTH_NONE         ((unsigned long)0)
-#define CURLAUTH_BASIC        (((unsigned long)1)<<0)
-#define CURLAUTH_DIGEST       (((unsigned long)1)<<1)
-#define CURLAUTH_NEGOTIATE    (((unsigned long)1)<<2)
+#define CURLAUTH_BASIC        (((unsigned long)1) << 0)
+#define CURLAUTH_DIGEST       (((unsigned long)1) << 1)
+#define CURLAUTH_NEGOTIATE    (((unsigned long)1) << 2)
 /* Deprecated since the advent of CURLAUTH_NEGOTIATE */
 #define CURLAUTH_GSSNEGOTIATE CURLAUTH_NEGOTIATE
 /* Used for CURLOPT_SOCKS5_AUTH to stay terminologically correct */
 #define CURLAUTH_GSSAPI CURLAUTH_NEGOTIATE
-#define CURLAUTH_NTLM         (((unsigned long)1)<<3)
-#define CURLAUTH_DIGEST_IE    (((unsigned long)1)<<4)
+#define CURLAUTH_NTLM         (((unsigned long)1) << 3)
+#define CURLAUTH_DIGEST_IE    (((unsigned long)1) << 4)
 #ifndef CURL_NO_OLDIES
   /* functionality removed since 8.8.0 */
-#define CURLAUTH_NTLM_WB      (((unsigned long)1)<<5)
+#define CURLAUTH_NTLM_WB      (((unsigned long)1) << 5)
 #endif
-#define CURLAUTH_BEARER       (((unsigned long)1)<<6)
-#define CURLAUTH_AWS_SIGV4    (((unsigned long)1)<<7)
-#define CURLAUTH_ONLY         (((unsigned long)1)<<31)
+#define CURLAUTH_BEARER       (((unsigned long)1) << 6)
+#define CURLAUTH_AWS_SIGV4    (((unsigned long)1) << 7)
+#define CURLAUTH_ONLY         (((unsigned long)1) << 31)
 #define CURLAUTH_ANY          (~CURLAUTH_DIGEST_IE)
 #define CURLAUTH_ANYSAFE      (~(CURLAUTH_BASIC | CURLAUTH_DIGEST_IE))
 
-#define CURLSSH_AUTH_ANY       ~0L     /* all types supported by the server */
-#define CURLSSH_AUTH_NONE      0L      /* none allowed, silly but complete */
-#define CURLSSH_AUTH_PUBLICKEY (1L<<0) /* public/private key files */
-#define CURLSSH_AUTH_PASSWORD  (1L<<1) /* password */
-#define CURLSSH_AUTH_HOST      (1L<<2) /* host key files */
-#define CURLSSH_AUTH_KEYBOARD  (1L<<3) /* keyboard interactive */
-#define CURLSSH_AUTH_AGENT     (1L<<4) /* agent (ssh-agent, pageant...) */
-#define CURLSSH_AUTH_GSSAPI    (1L<<5) /* gssapi (kerberos, ...) */
-#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
+#define CURLSSH_AUTH_ANY       ~0L       /* all types supported by server */
+#define CURLSSH_AUTH_NONE      0L        /* none allowed, silly but complete */
+#define CURLSSH_AUTH_PUBLICKEY (1L << 0) /* public/private key files */
+#define CURLSSH_AUTH_PASSWORD  (1L << 1) /* password */
+#define CURLSSH_AUTH_HOST      (1L << 2) /* host key files */
+#define CURLSSH_AUTH_KEYBOARD  (1L << 3) /* keyboard interactive */
+#define CURLSSH_AUTH_AGENT     (1L << 4) /* agent (ssh-agent, pageant...) */
+#define CURLSSH_AUTH_GSSAPI    (1L << 5) /* gssapi (kerberos, ...) */
+#define CURLSSH_AUTH_DEFAULT   CURLSSH_AUTH_ANY
 
 #define CURLGSSAPI_DELEGATION_NONE        0L      /* no delegation (default) */
 #define CURLGSSAPI_DELEGATION_POLICY_FLAG (1L<<0) /* if permitted by policy */
@@ -932,31 +932,31 @@ typedef enum {
    have introduced work-arounds for this flaw but those work-arounds sometimes
    make the SSL communication fail. To regain functionality with those broken
    servers, a user can this way allow the vulnerability back. */
-#define CURLSSLOPT_ALLOW_BEAST (1L<<0)
+#define CURLSSLOPT_ALLOW_BEAST (1L << 0)
 
 /* - NO_REVOKE tells libcurl to disable certificate revocation checks for those
    SSL backends where such behavior is present. */
-#define CURLSSLOPT_NO_REVOKE (1L<<1)
+#define CURLSSLOPT_NO_REVOKE (1L << 1)
 
 /* - NO_PARTIALCHAIN tells libcurl to *NOT* accept a partial certificate chain
    if possible. The OpenSSL backend has this ability. */
-#define CURLSSLOPT_NO_PARTIALCHAIN (1L<<2)
+#define CURLSSLOPT_NO_PARTIALCHAIN (1L << 2)
 
 /* - REVOKE_BEST_EFFORT tells libcurl to ignore certificate revocation offline
    checks and ignore missing revocation list for those SSL backends where such
    behavior is present. */
-#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L<<3)
+#define CURLSSLOPT_REVOKE_BEST_EFFORT (1L << 3)
 
 /* - CURLSSLOPT_NATIVE_CA tells libcurl to use standard certificate store of
    operating system. Currently implemented under MS-Windows. */
-#define CURLSSLOPT_NATIVE_CA (1L<<4)
+#define CURLSSLOPT_NATIVE_CA (1L << 4)
 
 /* - CURLSSLOPT_AUTO_CLIENT_CERT tells libcurl to automatically locate and use
    a client certificate for authentication. (Schannel) */
-#define CURLSSLOPT_AUTO_CLIENT_CERT (1L<<5)
+#define CURLSSLOPT_AUTO_CLIENT_CERT (1L << 5)
 
 /* If possible, send data using TLS 1.3 early data */
-#define CURLSSLOPT_EARLYDATA (1L<<6)
+#define CURLSSLOPT_EARLYDATA (1L << 6)
 
 /* The default connection attempt delay in milliseconds for happy eyeballs.
    CURLOPT_HAPPY_EYEBALLS_TIMEOUT_MS.3 and happy-eyeballs-timeout-ms.d document
@@ -1023,20 +1023,20 @@ typedef enum {
 
 /* bitmask defines for CURLOPT_HEADEROPT */
 #define CURLHEADER_UNIFIED  0L
-#define CURLHEADER_SEPARATE (1L<<0)
+#define CURLHEADER_SEPARATE (1L << 0)
 
 /* CURLALTSVC_* are bits for the CURLOPT_ALTSVC_CTRL option */
-#define CURLALTSVC_READONLYFILE (1L<<2)
-#define CURLALTSVC_H1           (1L<<3)
-#define CURLALTSVC_H2           (1L<<4)
-#define CURLALTSVC_H3           (1L<<5)
+#define CURLALTSVC_READONLYFILE (1L << 2)
+#define CURLALTSVC_H1           (1L << 3)
+#define CURLALTSVC_H2           (1L << 4)
+#define CURLALTSVC_H3           (1L << 5)
 
 /* bitmask values for CURLOPT_UPLOAD_FLAGS */
-#define CURLULFLAG_ANSWERED (1L<<0)
-#define CURLULFLAG_DELETED  (1L<<1)
-#define CURLULFLAG_DRAFT    (1L<<2)
-#define CURLULFLAG_FLAGGED  (1L<<3)
-#define CURLULFLAG_SEEN     (1L<<4)
+#define CURLULFLAG_ANSWERED (1L << 0)
+#define CURLULFLAG_DELETED  (1L << 1)
+#define CURLULFLAG_DRAFT    (1L << 2)
+#define CURLULFLAG_FLAGGED  (1L << 3)
+#define CURLULFLAG_SEEN     (1L << 4)
 
 struct curl_hstsentry {
   char *name;
@@ -1065,41 +1065,41 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
                                                void *userp);
 
 /* CURLHSTS_* are bits for the CURLOPT_HSTS option */
-#define CURLHSTS_ENABLE       (1L<<0)
-#define CURLHSTS_READONLYFILE (1L<<1)
+#define CURLHSTS_ENABLE       (1L << 0)
+#define CURLHSTS_READONLYFILE (1L << 1)
 
 /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
    options. Do not use. */
-#define CURLPROTO_HTTP    (1L<<0)
-#define CURLPROTO_HTTPS   (1L<<1)
-#define CURLPROTO_FTP     (1L<<2)
-#define CURLPROTO_FTPS    (1L<<3)
-#define CURLPROTO_SCP     (1L<<4)
-#define CURLPROTO_SFTP    (1L<<5)
-#define CURLPROTO_TELNET  (1L<<6)
-#define CURLPROTO_LDAP    (1L<<7)
-#define CURLPROTO_LDAPS   (1L<<8)
-#define CURLPROTO_DICT    (1L<<9)
-#define CURLPROTO_FILE    (1L<<10)
-#define CURLPROTO_TFTP    (1L<<11)
-#define CURLPROTO_IMAP    (1L<<12)
-#define CURLPROTO_IMAPS   (1L<<13)
-#define CURLPROTO_POP3    (1L<<14)
-#define CURLPROTO_POP3S   (1L<<15)
-#define CURLPROTO_SMTP    (1L<<16)
-#define CURLPROTO_SMTPS   (1L<<17)
-#define CURLPROTO_RTSP    (1L<<18)
-#define CURLPROTO_RTMP    (1L<<19)
-#define CURLPROTO_RTMPT   (1L<<20)
-#define CURLPROTO_RTMPE   (1L<<21)
-#define CURLPROTO_RTMPTE  (1L<<22)
-#define CURLPROTO_RTMPS   (1L<<23)
-#define CURLPROTO_RTMPTS  (1L<<24)
-#define CURLPROTO_GOPHER  (1L<<25)
-#define CURLPROTO_SMB     (1L<<26)
-#define CURLPROTO_SMBS    (1L<<27)
-#define CURLPROTO_MQTT    (1L<<28)
-#define CURLPROTO_GOPHERS (1L<<29)
+#define CURLPROTO_HTTP    (1L << 0)
+#define CURLPROTO_HTTPS   (1L << 1)
+#define CURLPROTO_FTP     (1L << 2)
+#define CURLPROTO_FTPS    (1L << 3)
+#define CURLPROTO_SCP     (1L << 4)
+#define CURLPROTO_SFTP    (1L << 5)
+#define CURLPROTO_TELNET  (1L << 6)
+#define CURLPROTO_LDAP    (1L << 7)
+#define CURLPROTO_LDAPS   (1L << 8)
+#define CURLPROTO_DICT    (1L << 9)
+#define CURLPROTO_FILE    (1L << 10)
+#define CURLPROTO_TFTP    (1L << 11)
+#define CURLPROTO_IMAP    (1L << 12)
+#define CURLPROTO_IMAPS   (1L << 13)
+#define CURLPROTO_POP3    (1L << 14)
+#define CURLPROTO_POP3S   (1L << 15)
+#define CURLPROTO_SMTP    (1L << 16)
+#define CURLPROTO_SMTPS   (1L << 17)
+#define CURLPROTO_RTSP    (1L << 18)
+#define CURLPROTO_RTMP    (1L << 19)
+#define CURLPROTO_RTMPT   (1L << 20)
+#define CURLPROTO_RTMPE   (1L << 21)
+#define CURLPROTO_RTMPTE  (1L << 22)
+#define CURLPROTO_RTMPS   (1L << 23)
+#define CURLPROTO_RTMPTS  (1L << 24)
+#define CURLPROTO_GOPHER  (1L << 25)
+#define CURLPROTO_SMB     (1L << 26)
+#define CURLPROTO_SMBS    (1L << 27)
+#define CURLPROTO_MQTT    (1L << 28)
+#define CURLPROTO_GOPHERS (1L << 29)
 #define CURLPROTO_ALL     (~0L) /* enable everything */
 
 /* long may be 32 or 64 bits, but we should never depend on anything else
@@ -2424,7 +2424,7 @@ typedef struct curl_mime      curl_mime;      /* Mime context. */
 typedef struct curl_mimepart  curl_mimepart;  /* Mime part context. */
 
 /* CURLMIMEOPT_ defines are for the CURLOPT_MIME_OPTIONS option. */
-#define CURLMIMEOPT_FORMESCAPE  (1L<<0) /* Use backslash-escaping for forms. */
+#define CURLMIMEOPT_FORMESCAPE (1L << 0) /* Use backslash-escaping for forms */
 
 /*
  * NAME curl_mime_init()
@@ -3006,12 +3006,12 @@ typedef enum {
   CURLCLOSEPOLICY_LAST /* last, never use this */
 } curl_closepolicy;
 
-#define CURL_GLOBAL_SSL (1<<0) /* no purpose since 7.57.0 */
-#define CURL_GLOBAL_WIN32 (1<<1)
+#define CURL_GLOBAL_SSL (1 << 0) /* no purpose since 7.57.0 */
+#define CURL_GLOBAL_WIN32 (1 << 1)
 #define CURL_GLOBAL_ALL (CURL_GLOBAL_SSL | CURL_GLOBAL_WIN32)
 #define CURL_GLOBAL_NOTHING 0
 #define CURL_GLOBAL_DEFAULT CURL_GLOBAL_ALL
-#define CURL_GLOBAL_ACK_EINTR (1<<2)
+#define CURL_GLOBAL_ACK_EINTR (1 << 2)
 
 /*****************************************************************************
  * Setup defines, protos etc for the sharing stuff.
@@ -3247,10 +3247,10 @@ CURL_EXTERN const char *curl_share_strerror(CURLSHcode);
  */
 CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
 
-#define CURLPAUSE_RECV      (1<<0)
+#define CURLPAUSE_RECV      (1 << 0)
 #define CURLPAUSE_RECV_CONT (0)
 
-#define CURLPAUSE_SEND      (1<<2)
+#define CURLPAUSE_SEND      (1 << 2)
 #define CURLPAUSE_SEND_CONT (0)
 
 #define CURLPAUSE_ALL       (CURLPAUSE_RECV | CURLPAUSE_SEND)
index 5a19dc2f5d7ee38177dad370932d115711425b8d..2ce526eaea2150f9da4d6fb7030e69634052eedd 100644 (file)
@@ -71,8 +71,8 @@
  */
 #define LIBCURL_TIMESTAMP "[unreleased]"
 
-#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
-#define CURL_AT_LEAST_VERSION(x,y,z) \
+#define CURL_VERSION_BITS(x, y, z) ((x) << 16 | (y) << 8 | (z))
+#define CURL_AT_LEAST_VERSION(x, y, z) \
   (LIBCURL_VERSION_NUM >= CURL_VERSION_BITS(x, y, z))
 
 #endif /* CURLINC_CURLVER_H */
index 7465274b9c406456a2839ca4c68400a69378c702..e7334b5a3a4d35f9d23fc47a4d9826370b0dc0c5 100644 (file)
@@ -38,11 +38,11 @@ struct curl_header {
 };
 
 /* 'origin' bits */
-#define CURLH_HEADER    (1<<0) /* plain server header */
-#define CURLH_TRAILER   (1<<1) /* trailers */
-#define CURLH_CONNECT   (1<<2) /* CONNECT headers */
-#define CURLH_1XX       (1<<3) /* 1xx headers */
-#define CURLH_PSEUDO    (1<<4) /* pseudo headers */
+#define CURLH_HEADER    (1 << 0) /* plain server header */
+#define CURLH_TRAILER   (1 << 1) /* trailers */
+#define CURLH_CONNECT   (1 << 2) /* CONNECT headers */
+#define CURLH_1XX       (1 << 3) /* 1xx headers */
+#define CURLH_PSEUDO    (1 << 4) /* pseudo headers */
 
 typedef enum {
   CURLHE_OK,
index f3f66030ca25ef58a90a3cc6bc6b38fc8415fc7b..531c1a954a955b9f4c42f64a87be1ca9918f601c 100644 (file)
@@ -412,12 +412,12 @@ typedef enum {
 /* - CURLMNWC_CLEAR_CONNS tells libcurl to prevent further reuse of existing
    connections. Connections that are idle will be closed. Ongoing transfers
    will continue with the connection they have. */
-#define CURLMNWC_CLEAR_CONNS (1L<<0)
+#define CURLMNWC_CLEAR_CONNS (1L << 0)
 
 /* - CURLMNWC_CLEAR_DNS tells libcurl to prevent further reuse of existing
    connections. Connections that are idle will be closed. Ongoing transfers
    will continue with the connection they have. */
-#define CURLMNWC_CLEAR_DNS (1L<<0)
+#define CURLMNWC_CLEAR_DNS (1L << 0)
 
 /*
  * Name:    curl_multi_setopt()
index 77cab7768f294a9ebef758cedc27fbe858a84494..835a722e9188b6f4a2298945ca03f5c59e62abb7 100644 (file)
@@ -44,7 +44,7 @@ typedef enum {
 
 /* "alias" means it is provided for old programs to remain functional,
    we prefer another name */
-#define CURLOT_FLAG_ALIAS (1<<0)
+#define CURLOT_FLAG_ALIAS (1 << 0)
 
 /* The CURLOPTTYPE_* id ranges can still be used to figure out what type/size
    to use for curl_easy_setopt() for the given id */
index 34c11a6bb7f203e8a05813202b38a29d8dde9fc3..dabe44a47d0d3f73dda0ed97c09c21b0668b825f 100644 (file)
@@ -81,28 +81,28 @@ typedef enum {
   CURLUPART_ZONEID /* added in 7.65.0 */
 } CURLUPart;
 
-#define CURLU_DEFAULT_PORT (1<<0)       /* return default port number */
-#define CURLU_NO_DEFAULT_PORT (1<<1)    /* act as if no port number was set,
-                                           if the port number matches the
-                                           default for the scheme */
-#define CURLU_DEFAULT_SCHEME (1<<2)     /* return default scheme if
-                                           missing */
-#define CURLU_NON_SUPPORT_SCHEME (1<<3) /* allow non-supported scheme */
-#define CURLU_PATH_AS_IS (1<<4)         /* leave dot sequences */
-#define CURLU_DISALLOW_USER (1<<5)      /* no user+password allowed */
-#define CURLU_URLDECODE (1<<6)          /* URL decode on get */
-#define CURLU_URLENCODE (1<<7)          /* URL encode on set */
-#define CURLU_APPENDQUERY (1<<8)        /* append a form style part */
-#define CURLU_GUESS_SCHEME (1<<9)       /* legacy curl-style guessing */
-#define CURLU_NO_AUTHORITY (1<<10)      /* Allow empty authority when the
-                                           scheme is unknown. */
-#define CURLU_ALLOW_SPACE (1<<11)       /* Allow spaces in the URL */
-#define CURLU_PUNYCODE (1<<12)          /* get the hostname in punycode */
-#define CURLU_PUNY2IDN (1<<13)          /* punycode => IDN conversion */
-#define CURLU_GET_EMPTY (1<<14)         /* allow empty queries and fragments
-                                           when extracting the URL or the
-                                           components */
-#define CURLU_NO_GUESS_SCHEME (1<<15)   /* for get, do not accept a guess */
+#define CURLU_DEFAULT_PORT (1 << 0)       /* return default port number */
+#define CURLU_NO_DEFAULT_PORT (1 << 1)    /* act as if no port number was set,
+                                             if the port number matches the
+                                             default for the scheme */
+#define CURLU_DEFAULT_SCHEME (1 << 2)     /* return default scheme if
+                                             missing */
+#define CURLU_NON_SUPPORT_SCHEME (1 << 3) /* allow non-supported scheme */
+#define CURLU_PATH_AS_IS (1 << 4)         /* leave dot sequences */
+#define CURLU_DISALLOW_USER (1 << 5)      /* no user+password allowed */
+#define CURLU_URLDECODE (1 << 6)          /* URL decode on get */
+#define CURLU_URLENCODE (1 << 7)          /* URL encode on set */
+#define CURLU_APPENDQUERY (1 << 8)        /* append a form style part */
+#define CURLU_GUESS_SCHEME (1 << 9)       /* legacy curl-style guessing */
+#define CURLU_NO_AUTHORITY (1 << 10)      /* Allow empty authority when the
+                                             scheme is unknown. */
+#define CURLU_ALLOW_SPACE (1 << 11)       /* Allow spaces in the URL */
+#define CURLU_PUNYCODE (1 << 12)          /* get the hostname in punycode */
+#define CURLU_PUNY2IDN (1 << 13)          /* punycode => IDN conversion */
+#define CURLU_GET_EMPTY (1 << 14)         /* allow empty queries and fragments
+                                             when extracting the URL or the
+                                             components */
+#define CURLU_NO_GUESS_SCHEME (1 << 15)   /* for get, do not accept a guess */
 
 typedef struct Curl_URL CURLU;
 
index df8590f399d5164f464d11a94e82ca03b04e907c..402a2ca0f56255058f512133d4aab914145a2a33 100644 (file)
@@ -37,12 +37,12 @@ struct curl_ws_frame {
 };
 
 /* flag bits */
-#define CURLWS_TEXT       (1<<0)
-#define CURLWS_BINARY     (1<<1)
-#define CURLWS_CONT       (1<<2)
-#define CURLWS_CLOSE      (1<<3)
-#define CURLWS_PING       (1<<4)
-#define CURLWS_OFFSET     (1<<5)
+#define CURLWS_TEXT       (1 << 0)
+#define CURLWS_BINARY     (1 << 1)
+#define CURLWS_CONT       (1 << 2)
+#define CURLWS_CLOSE      (1 << 3)
+#define CURLWS_PING       (1 << 4)
+#define CURLWS_OFFSET     (1 << 5)
 
 /*
  * NAME curl_ws_recv()
@@ -57,7 +57,7 @@ CURL_EXTERN CURLcode curl_ws_recv(CURL *curl, void *buffer, size_t buflen,
                                   const struct curl_ws_frame **metap);
 
 /* flags for curl_ws_send() */
-#define CURLWS_PONG       (1<<6)
+#define CURLWS_PONG       (1 << 6)
 
 /*
  * NAME curl_ws_send()
@@ -86,8 +86,8 @@ CURL_EXTERN CURLcode curl_ws_start_frame(CURL *curl,
                                          curl_off_t frame_len);
 
 /* bits for the CURLOPT_WS_OPTIONS bitmask: */
-#define CURLWS_RAW_MODE   (1L<<0)
-#define CURLWS_NOAUTOPONG (1L<<1)
+#define CURLWS_RAW_MODE   (1L << 0)
+#define CURLWS_NOAUTOPONG (1L << 1)
 
 CURL_EXTERN const struct curl_ws_frame *curl_ws_meta(CURL *curl);
 
index 76d67b08fea4eda723ee027703a01f03f1dd2fd4..7ce5045851ba70c98e34d52e2e10b6f3a562afed 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef __AMIGA__
index d723de987366a03dfab806c86e44fcc40eed7be8..7544140d4334cfc4d834d568d3f5cb8047e5d8a9 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef CURLRES_ARES
@@ -872,7 +871,7 @@ static CURLcode async_ares_set_dns_servers(struct Curl_easy *data,
     result = CURLE_BAD_FUNCTION_ARGUMENT;
     break;
   }
-#else /* too old c-ares version! */
+#else /* c-ares version too old! */
   (void)data;
   (void)(ares_result);
 #endif
index 398e41dffd0b47d7ce25d34ddadbd728cca8f6d8..02797f1afb7ea97460b01e89d4c9d2446e4e1019 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
@@ -40,8 +39,7 @@
 
 #ifdef USE_ARES
 #include <ares.h>
-#include <ares_version.h> /* really old c-ares did not include this by
-                             itself */
+#include <ares_version.h> /* really old c-ares did not include it by itself */
 #endif
 
 #include "urldata.h"
@@ -173,7 +171,7 @@ int Curl_ares_perform(ares_channel channel, timediff_t timeout_ms)
   return nfds;
 }
 
-#endif
+#endif /* USE_ARES */
 
 #endif /* CURLRES_ASYNCH */
 
index 64251ae57ee14b4ec85430278d984b25759c521a..690e8139bd33731a6acbcd0ecfdabd914cc83901 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
-#include "socketpair.h"
 
 /***********************************************************************
  * Only for threaded name resolves builds
  **********************************************************************/
 #ifdef CURLRES_THREADED
 
+#include "socketpair.h"
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 87c6532a3d9db366d7c9761ce0d69a2cf20a7337..b9610810c761bc1f13afa5ead1912c329adc83d2 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 struct Curl_easy;
index 6eeeeb35d4325486ab7b9978713d027b2af665c8..750d86888f381586bfabd8ef60d9900ac120a190 100644 (file)
@@ -21,8 +21,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
+
 #include "bufq.h"
 
 static bool chunk_is_empty(const struct buf_chunk *chunk)
index e5b5a4d985cdaaac8bdf08bfe8013631f3bfe005..b1272d589de21f0d80b4638427a1a4795ef7bf11 100644 (file)
@@ -21,8 +21,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
+
 #include "urldata.h"
 #include "bufref.h"
 #include "strdup.h"
index 5c764bb59f3004c05d79dfc4a461ccb05fbbc96b..c41a68dee1d1c915fa991a00b7874bda97e4d94d 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
@@ -788,4 +787,4 @@ CURLcode Curl_cf_h1_proxy_insert_after(struct Curl_cfilter *cf_at,
   return result;
 }
 
-#endif /* !CURL_DISABLE_PROXY && ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
index ded55db9df317962aff465ca3535c8db7ee08e5f..e48d827825d3ebeeac1bd65fd9eb305b2e845106 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
index d35d8b4d459765325cd1230348c20b8e282ad5f0..d225d699898ac714eef94e35bd493aab57c90d3c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_PROXY) && \
index 1b3f85aaaff224fb3f3331f6e55bb14e48a8dda1..318ce1973fa1fca5571c80277b29154f40569723 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if defined(USE_NGHTTP2) && !defined(CURL_DISABLE_PROXY)
index ea35f040a33c0218009d4a28239632c7abcff968..6c9bfdd137637c89251e2451909fb48e9a0581db 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_PROXY
index da9920fd89ddeecd7f34576a48e934632af03bd0..6d67597cd7d11bf92fc822334a5f5cd31664f73c 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 4882f28c4b268c1b9dd4a959953cf5464106bc9a..d2a08d124f4f848fc94b340de3111d5165cf815f 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
index 36d53ed9c2341bf8cab38dc4ef0807a9b9b2616c..a24abbe1906bfddc650d14ae4f0178c25416a83d 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index ab28bc40aabb8b2b89c86e6f3677c8a1257d3f6d..c0f01c1a00ef1c0fa5f43e42206757187257e944 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 5f3e51111701074a4fc41c048b7fbceb3c3ea082..b91d30c20449a2f4305ea7f35bfc26dfa1f1a829 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 6834c4133a75d641d8b80146cadb220b0793d3c8..9faf01de755d092998b002b5732ef86104f66ba5 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/timediff.h"
 
 struct bufq;
index 7fccde05e1726a5e3a93a2c323f07b9525a107e0..1a3dba7f63f78955afdecbd1149f028bce6d4064 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index fabb967bd0a32fc2e3e3413deea6435fc616459f..9b392af05ccd2d6f794ca2db680bbd9bfc7475fb 100644 (file)
@@ -24,7 +24,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/timeval.h"
 
 struct connectdata;
index bb51701d0ce345007a6f6bb8dd6895a4a4c59d66..6e178345f4a171be6274b4048addc915f78074d5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 7a9eb354e471885f096a0acd85993c6cbae2ab4c..70fb5692cf711dbe8fc149ca421c57f8b74c20c3 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index de382f3b00e6ae492b382e927ed8913bffc18572..c8072228b94ee34172d5eb04c82bf57adbc722fc 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
index c7f2d6610ab4eda71993a2b3e1f1c560e0bf6faa..84e5b2a116803bc001c1f4b5c86da548e6e30a51 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 793b4c6c2c965964387d9da667092281b595f96f..ad2d009673f3ead6b1887cb212dc909a2e74254e 100644 (file)
@@ -24,7 +24,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/timeval.h"
 
 struct connectdata;
index 43dcfd25c790e88ee4b2d3013ac3890c07829ee2..61c8b1881967bf654d7ecc0d4eae799e8971a3a1 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 378b31ed05da86ebb02813329150bec96aa0ec16..ca80f3a45df89ba17f5c7edacc51987af285950c 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index d982e31269faa94ec190758847e2ff30019ad6d8..864b411b68ccf9fce23273ea973ed16a5d90f8dc 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "curl_endian.h"
index d61e7d43bc50517f699cdf354fbdcab1ea6733a2..8e35edeed6306f7484153a169f451c194c7af545 100644 (file)
@@ -21,8 +21,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
+
 #ifndef CURL_DISABLE_FTP
 
 #include "curl_fnmatch.h"
@@ -356,7 +356,8 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
   return loop((const unsigned char *)pattern,
               (const unsigned char *)string, 2);
 }
-#else
+#else /* HAVE_FNMATCH */
+
 #include <fnmatch.h>
 /*
  * @unittest: 1307
@@ -379,7 +380,6 @@ int Curl_fnmatch(void *ptr, const char *pattern, const char *string)
   }
   /* not reached */
 }
+#endif /* !HAVE_FNMATCH */
 
-#endif
-
-#endif /* if FTP is disabled */
+#endif /* !CURL_DISABLE_FTP */
index b8c2a4353c6230bb8a821c86ef37cc3eb5787e73..61d2a0c4e95d9a54d65a8d9c8e3ab0a224e459ef 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #define CURL_FNMATCH_MATCH    0
 #define CURL_FNMATCH_NOMATCH  1
 #define CURL_FNMATCH_FAIL     2
index 383b307e212035e6c28f7e190daca264f5a00340..9559c0d0c4f5e7b3a82905a50d64839cbba21e2c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) ||  \
@@ -156,4 +155,4 @@ fail:
   return result;
 }
 
-#endif /* ! disabled */
+#endif /* !disabled */
index a3dc1382bca8360afbc805cf7be665ec5efc82d2..bd402d44894a9e303b1120b5015d1a6291938b21 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/fopen.h"
 
 CURLcode Curl_fopen(struct Curl_easy *data, const char *filename,
index 5e553f4d31decc9b0fe5d939547e5a0ed63071f4..46c1287924396e43b67937c7f07cfc8e74c5d0ca 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_COOKIES) || !defined(CURL_DISABLE_ALTSVC) ||  \
index 176d5f7a30e302b95f64260a1620d9fdc78eb66e..6b90ac4727412bd4ef8b79754eb050d09f322ab0 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/dynbuf.h"
 
 /* Curl_get_line() returns complete lines that end with a newline. */
index 4d772cb4915357114964415c9b796d1e780b33b2..f154c837f6e00c7ce687fc3a847a6e8f5095d63f 100644 (file)
@@ -21,8 +21,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
+
 #include "curl_gethostname.h"
 #include "curlx/strcopy.h"
 
index 2145b42686d3e0c3aba836287f8d0f971fd27bae..8c82f778cdf63d815acbbfcce7f5feffdac6eb30 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_GSSAPI
index d4fbf5c2403cb886bda88542cb9d0e61b6c43a9d..8c09c72c9bc4673d3f37508f99d5e97239edb4ea 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 9d4a12ed3d27f0deaf1733fd026e65fd8540c417..05d1624974345dc5936b5875baa448b17bd9ce52 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_CURL_NTLM_CORE
index 27f5fc01ba102153de67776281b886bef60a1d8a..59ee176bc9e421a1043b2158a86d5370352e1ae7 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "curl_memrchr.h"
index 2ee65f3c0ba0e21d4f19fb71d0dd84e47a934690..248368b25c4be678f171c6bdeb0a34c1df6620cf 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_MEMRCHR
index b34d42f6bf73fc8443a912fc58b173a2c422679a..2f4f7c3abdb9cbaaecd2a4dcfc2811b6c92c7cab 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_CURL_NTLM_CORE
index 0d2aa2186274706746a070ecc9611bde496221c5..947b836966baecb8c952bdab09ac9357a5a6f102 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_CURL_NTLM_CORE
index c4118b07d9c89dbf9a944fefb943838fd45d7e60..14218f1eee4ae21c7c25ec54d3b4dee06d289ff7 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "curl_range.h"
index 842ada9ab106008037b7f7c0c1b18821fbd32535..97354677c2aa3af38a1e2db21a07ab614c142a80 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 36f81464a4ea5251356dc736d1a3e749969c584a..98816f8269455840f3603b4dfc6e34fae9a92569 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_LIBRTMP
@@ -384,4 +383,4 @@ void Curl_rtmp_version(char *version, size_t len)
                  suff);
 }
 
-#endif  /* USE_LIBRTMP */
+#endif /* USE_LIBRTMP */
index f71c909a681b5401eb7dc99266f1ee6e00aca5bd..123c1c14fb8e3f72d9d16fc87d4f86702c8c5894 100644 (file)
@@ -32,7 +32,6 @@
  * Draft   LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \
index 0632e09ebdd3ea1d7cdbf021ee65d468f69814b2..8432d261ecc8386f1af3f18993984ff070a6251f 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "bufref.h"
 
 struct Curl_easy;
index 99a87b290b1b3bcb7908f5b4b6ea3b0c035cd40b..0aaa4126f4e3f07fa78d9883b0fada4a3ba07efc 100644 (file)
@@ -24,7 +24,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
index aff0ce0a473795284b6bce4c94b31fa6d08a15a4..a6c78d67cf674b6c47c07806bec41036cdb72365 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_DIGEST_AUTH) && !defined(CURL_DISABLE_SHA512_256)
@@ -75,7 +74,7 @@
 #  ifdef SHA512_256_DIGEST_SIZE
 #    define USE_GNUTLS_SHA512_256           1
 #  endif
-#endif /* ! HAS_SHA512_256_IMPLEMENTATION && USE_GNUTLS */
+#endif /* !HAS_SHA512_256_IMPLEMENTATION && USE_GNUTLS */
 
 #ifdef USE_OPENSSL_SHA512_256
 
@@ -169,9 +168,9 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
   if(ret == CURLE_OK)
     memcpy(digest, tmp_digest, CURL_SHA512_256_DIGEST_SIZE);
   explicit_memset(tmp_digest, 0, sizeof(tmp_digest));
-#else  /* ! NEED_NETBSD_SHA512_256_WORKAROUND */
+#else /* !NEED_NETBSD_SHA512_256_WORKAROUND */
   ret = EVP_DigestFinal_ex(*ctx, digest, NULL) ? CURLE_OK : CURLE_SSL_CIPHER;
-#endif /* NEED_NETBSD_SHA512_256_WORKAROUND */
+#endif /* NEED_NETBSD_SHA512_256_WORKAROUND */
 
   EVP_MD_CTX_destroy(*ctx);
   *ctx = NULL;
@@ -288,15 +287,16 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
    ((uint64_t)(((const uint8_t *)(ptr))[6]) << 8)  | \
     (uint64_t)(((const uint8_t *)(ptr))[7]))
 
-#define CURL_PUT_64BIT_BE(ptr,val) do {                        \
-    ((uint8_t*)(ptr))[7] = (uint8_t) ((uint64_t)(val));        \
-    ((uint8_t*)(ptr))[6] = (uint8_t)(((uint64_t)(val)) >> 8);  \
-    ((uint8_t*)(ptr))[5] = (uint8_t)(((uint64_t)(val)) >> 16); \
-    ((uint8_t*)(ptr))[4] = (uint8_t)(((uint64_t)(val)) >> 24); \
-    ((uint8_t*)(ptr))[3] = (uint8_t)(((uint64_t)(val)) >> 32); \
-    ((uint8_t*)(ptr))[2] = (uint8_t)(((uint64_t)(val)) >> 40); \
-    ((uint8_t*)(ptr))[1] = (uint8_t)(((uint64_t)(val)) >> 48); \
-    ((uint8_t*)(ptr))[0] = (uint8_t)(((uint64_t)(val)) >> 56); \
+#define CURL_PUT_64BIT_BE(ptr, val)                             \
+  do {                                                          \
+    ((uint8_t *)(ptr))[7] = (uint8_t)((uint64_t)(val));         \
+    ((uint8_t *)(ptr))[6] = (uint8_t)(((uint64_t)(val)) >> 8);  \
+    ((uint8_t *)(ptr))[5] = (uint8_t)(((uint64_t)(val)) >> 16); \
+    ((uint8_t *)(ptr))[4] = (uint8_t)(((uint64_t)(val)) >> 24); \
+    ((uint8_t *)(ptr))[3] = (uint8_t)(((uint64_t)(val)) >> 32); \
+    ((uint8_t *)(ptr))[2] = (uint8_t)(((uint64_t)(val)) >> 40); \
+    ((uint8_t *)(ptr))[1] = (uint8_t)(((uint64_t)(val)) >> 48); \
+    ((uint8_t *)(ptr))[0] = (uint8_t)(((uint64_t)(val)) >> 56); \
   } while(0)
 
 /* Defined as a function. The macro version may duplicate the binary code
@@ -459,9 +459,9 @@ static void Curl_sha512_256_transform(uint64_t H[SHA512_256_HASH_SIZE_WORDS],
   (Curl_rotr64((x), 28) ^ Curl_rotr64((x), 34) ^ Curl_rotr64((x), 39))
 #define SIG1(x)                                                         \
   (Curl_rotr64((x), 14) ^ Curl_rotr64((x), 18) ^ Curl_rotr64((x), 41))
-#define sig0(x)                                                 \
-  (Curl_rotr64((x), 1) ^ Curl_rotr64((x), 8) ^ ((x) >> 7))
-#define sig1(x)                                                 \
+#define sig0(x)                                               \
+  (Curl_rotr64((x),  1) ^ Curl_rotr64((x),  8) ^ ((x) >> 7))
+#define sig1(x)                                               \
   (Curl_rotr64((x), 19) ^ Curl_rotr64((x), 61) ^ ((x) >> 6))
 
   if(1) {
@@ -601,7 +601,7 @@ static CURLcode Curl_sha512_256_update(void *context,
                                        const unsigned char *data,
                                        size_t length)
 {
-  unsigned int bytes_have; /**< Number of bytes in the context buffer */
+  unsigned int bytes_have; /* Number of bytes in the context buffer */
   struct Curl_sha512_256ctx * const ctx = (struct Curl_sha512_256ctx *)context;
   /* the void pointer here is required to mute Intel compiler warning */
   void * const ctx_buf = ctx->buffer;
@@ -625,7 +625,7 @@ static CURLcode Curl_sha512_256_update(void *context,
     if(length >= bytes_left) {
       /* Combine new data with data in the buffer and process the full
          block. */
-      memcpy(((unsigned char *)ctx_buf) + bytes_have, data, bytes_left);
+      memcpy((unsigned char *)ctx_buf + bytes_have, data, bytes_left);
       data += bytes_left;
       length -= bytes_left;
       Curl_sha512_256_transform(ctx->H, ctx->buffer);
@@ -644,7 +644,7 @@ static CURLcode Curl_sha512_256_update(void *context,
   if(length) {
     /* Copy incomplete block of new data (if any)
        to the buffer. */
-    memcpy(((unsigned char *)ctx_buf) + bytes_have, data, length);
+    memcpy((unsigned char *)ctx_buf + bytes_have, data, length);
   }
 
   return CURLE_OK;
@@ -672,8 +672,8 @@ static CURLcode Curl_sha512_256_update(void *context,
 static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
 {
   struct Curl_sha512_256ctx * const ctx = (struct Curl_sha512_256ctx *)context;
-  uint64_t num_bits;   /**< Number of processed bits */
-  unsigned int bytes_have; /**< Number of bytes in the context buffer */
+  uint64_t num_bits;   /* Number of processed bits */
+  unsigned int bytes_have; /* Number of bytes in the context buffer */
   /* the void pointer here is required to mute Intel compiler warning */
   void * const ctx_buf = ctx->buffer;
 
@@ -702,7 +702,7 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
     /* No space in the current block to put the total length of message.
        Pad the current block with zeros and process it. */
     if(bytes_have < CURL_SHA512_256_BLOCK_SIZE)
-      memset(((unsigned char *)ctx_buf) + bytes_have, 0,
+      memset((unsigned char *)ctx_buf + bytes_have, 0,
              CURL_SHA512_256_BLOCK_SIZE - bytes_have);
     /* Process the full block. */
     Curl_sha512_256_transform(ctx->H, ctx->buffer);
@@ -711,31 +711,29 @@ static CURLcode Curl_sha512_256_finish(unsigned char *digest, void *context)
   }
 
   /* Pad the rest of the buffer with zeros. */
-  memset(((unsigned char *)ctx_buf) + bytes_have, 0,
+  memset((unsigned char *)ctx_buf + bytes_have, 0,
          CURL_SHA512_256_BLOCK_SIZE - SHA512_256_SIZE_OF_LEN_ADD - bytes_have);
   /* Put high part of number of bits in processed message and then lower
      part of number of bits as big-endian values.
      See FIPS PUB 180-4 section 5.1.2. */
   /* Note: the target location is predefined and buffer is always aligned */
-  CURL_PUT_64BIT_BE(((unsigned char *)ctx_buf)        \
-                      + CURL_SHA512_256_BLOCK_SIZE    \
-                      - SHA512_256_SIZE_OF_LEN_ADD,   \
-                      ctx->count_bits_hi);
-  CURL_PUT_64BIT_BE(((unsigned char *)ctx_buf)        \
-                      + CURL_SHA512_256_BLOCK_SIZE    \
-                      - SHA512_256_SIZE_OF_LEN_ADD    \
-                      + SHA512_256_BYTES_IN_WORD,     \
-                      num_bits);
+  CURL_PUT_64BIT_BE((unsigned char *)ctx_buf +
+                    CURL_SHA512_256_BLOCK_SIZE - SHA512_256_SIZE_OF_LEN_ADD,
+                    ctx->count_bits_hi);
+  CURL_PUT_64BIT_BE((unsigned char *)ctx_buf +
+                    CURL_SHA512_256_BLOCK_SIZE - SHA512_256_SIZE_OF_LEN_ADD +
+                    SHA512_256_BYTES_IN_WORD,
+                    num_bits);
   /* Process the full final block. */
   Curl_sha512_256_transform(ctx->H, ctx->buffer);
 
   /* Put in BE mode the leftmost part of the hash as the final digest.
      See FIPS PUB 180-4 section 6.7. */
 
-  CURL_PUT_64BIT_BE((digest + 0 * SHA512_256_BYTES_IN_WORD), ctx->H[0]);
-  CURL_PUT_64BIT_BE((digest + 1 * SHA512_256_BYTES_IN_WORD), ctx->H[1]);
-  CURL_PUT_64BIT_BE((digest + 2 * SHA512_256_BYTES_IN_WORD), ctx->H[2]);
-  CURL_PUT_64BIT_BE((digest + 3 * SHA512_256_BYTES_IN_WORD), ctx->H[3]);
+  CURL_PUT_64BIT_BE(digest + 0 * SHA512_256_BYTES_IN_WORD, ctx->H[0]);
+  CURL_PUT_64BIT_BE(digest + 1 * SHA512_256_BYTES_IN_WORD, ctx->H[1]);
+  CURL_PUT_64BIT_BE(digest + 2 * SHA512_256_BYTES_IN_WORD, ctx->H[2]);
+  CURL_PUT_64BIT_BE(digest + 3 * SHA512_256_BYTES_IN_WORD, ctx->H[3]);
 
   /* Erase potentially sensitive data. */
   memset(ctx, 0, sizeof(struct Curl_sha512_256ctx));
index 0efcb27f3bff6631a9212a660e47b68ad969afa1..ddaf8be91dc5f80b05f5e6c4032034c8a08536d5 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_DIGEST_AUTH) && !defined(CURL_DISABLE_SHA512_256)
index 60ea78bf7fc0a261ea524b738708868507cbfb36..3ff27556845f3f8ae0b1e31de45b7007310437f0 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
@@ -93,7 +92,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
         if(!share->cookies)
           res = CURLSHE_NOMEM;
       }
-#else   /* CURL_DISABLE_HTTP */
+#else /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */
       res = CURLSHE_NOT_BUILT_IN;
 #endif
       break;
@@ -105,7 +104,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
         if(!share->hsts)
           res = CURLSHE_NOMEM;
       }
-#else   /* CURL_DISABLE_HSTS */
+#else /* CURL_DISABLE_HSTS */
       res = CURLSHE_NOT_BUILT_IN;
 #endif
       break;
@@ -160,7 +159,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
         Curl_cookie_cleanup(share->cookies);
         share->cookies = NULL;
       }
-#else   /* CURL_DISABLE_HTTP */
+#else /* CURL_DISABLE_HTTP || CURL_DISABLE_COOKIES */
       res = CURLSHE_NOT_BUILT_IN;
 #endif
       break;
@@ -170,7 +169,7 @@ CURLSHcode curl_share_setopt(CURLSH *sh, CURLSHoption option, ...)
       if(share->hsts) {
         Curl_hsts_cleanup(&share->hsts);
       }
-#else   /* CURL_DISABLE_HSTS */
+#else /* CURL_DISABLE_HSTS */
       res = CURLSHE_NOT_BUILT_IN;
 #endif
       break;
index 25d67ce1d92ecc5d36c284d2825b58822b4fd7e6..fcd9e32980e1b1a20134f704b49af81f5dc1033d 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "cookie.h"
index 93a68e56c580d134fd26ca8c055f620852b25852..6e272690054b0166f2c4358c2384e61f87e5bc61 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_WINDOWS_SSPI
index 46dc6faaa204f3270d572d3435c8ea24fd601b3e..0fba510357391d94d402bf7ba9bd70505acdc995 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_WINDOWS_SSPI
index 36a64eb8e3a81842c40eacd2867f959dad723e28..f5fea9804693e1eee1faae8c48e1b2625e014730 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if defined(USE_THREADS_POSIX) && defined(HAVE_PTHREAD_H)
index fd80a76ee5a7eff709b9fe8b4b324056d4999cbd..565d1b45f05473e39e1841479dda3342510768be 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "curl_trc.h"
@@ -86,8 +85,8 @@ static struct curl_trc_feat Curl_trc_feat_ids = {
   CURL_LOG_LVL_NONE,
 };
 #define CURL_TRC_IDS(data) \
-             (Curl_trc_is_verbose(data) && \
-             Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO)
+  (Curl_trc_is_verbose(data) && \
+  Curl_trc_feat_ids.log_level >= CURL_LOG_LVL_INFO)
 
 static size_t trc_print_ids(struct Curl_easy *data, char *buf, size_t maxlen)
 {
index 6d6a22ef9909bb817a45c696b1ec9f7d37f3637a..ff085d6a4eec688de649d5bf64d4c458c0512b46 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 struct Curl_easy;
 struct Curl_cfilter;
 
@@ -119,7 +118,7 @@ void Curl_trc_ssls(struct Curl_easy *data,
 #ifdef USE_SSH
 extern struct curl_trc_feat Curl_trc_feat_ssh;
 void Curl_trc_ssh(struct Curl_easy *data,
-                   const char *fmt, ...) CURL_PRINTF(2, 3);
+                  const char *fmt, ...) CURL_PRINTF(2, 3);
 #endif
 #if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)
 extern struct curl_trc_feat Curl_trc_feat_ws;
@@ -135,52 +134,76 @@ void Curl_trc_ws(struct Curl_easy *data,
   Curl_trc_ft_is_verbose(data, &Curl_trc_feat_timer)
 
 #if defined(CURL_HAVE_C99) && !defined(CURL_DISABLE_VERBOSE_STRINGS)
-#define infof(data, ...) \
-  do { if(Curl_trc_is_verbose(data)) \
-         Curl_infof(data, __VA_ARGS__); } while(0)
-#define CURL_TRC_M(data, ...) \
-  do { if(CURL_TRC_M_is_verbose(data)) \
-         Curl_trc_multi(data, __VA_ARGS__); } while(0)
-#define CURL_TRC_CF(data, cf, ...) \
-  do { if(Curl_trc_cf_is_verbose(cf, data)) \
-         Curl_trc_cf_infof(data, cf, __VA_ARGS__); } while(0)
-#define CURL_TRC_WRITE(data, ...) \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
-         Curl_trc_write(data, __VA_ARGS__); } while(0)
-#define CURL_TRC_READ(data, ...) \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
-         Curl_trc_read(data, __VA_ARGS__); } while(0)
-#define CURL_TRC_DNS(data, ...) \
-  do { if(CURL_TRC_DNS_is_verbose(data)) \
-         Curl_trc_dns(data, __VA_ARGS__); } while(0)
-#define CURL_TRC_TIMER(data, tid, ...) \
-  do { if(CURL_TRC_TIMER_is_verbose(data)) \
-         Curl_trc_timer(data, tid, __VA_ARGS__); } while(0)
+#define infof(data, ...)             \
+  do {                               \
+    if(Curl_trc_is_verbose(data))    \
+      Curl_infof(data, __VA_ARGS__); \
+  } while(0)
+#define CURL_TRC_M(data, ...)            \
+  do {                                   \
+    if(CURL_TRC_M_is_verbose(data))      \
+      Curl_trc_multi(data, __VA_ARGS__); \
+  } while(0)
+#define CURL_TRC_CF(data, cf, ...)              \
+  do {                                          \
+    if(Curl_trc_cf_is_verbose(cf, data))        \
+      Curl_trc_cf_infof(data, cf, __VA_ARGS__); \
+  } while(0)
+#define CURL_TRC_WRITE(data, ...)                          \
+  do {                                                     \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_write)) \
+      Curl_trc_write(data, __VA_ARGS__);                   \
+  } while(0)
+#define CURL_TRC_READ(data, ...)                          \
+  do {                                                    \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_read)) \
+      Curl_trc_read(data, __VA_ARGS__);                   \
+  } while(0)
+#define CURL_TRC_DNS(data, ...)        \
+  do {                                 \
+    if(CURL_TRC_DNS_is_verbose(data))  \
+      Curl_trc_dns(data, __VA_ARGS__); \
+  } while(0)
+#define CURL_TRC_TIMER(data, tid, ...)        \
+  do {                                        \
+    if(CURL_TRC_TIMER_is_verbose(data))       \
+      Curl_trc_timer(data, tid, __VA_ARGS__); \
+  } while(0)
 
 #ifndef CURL_DISABLE_FTP
-#define CURL_TRC_FTP(data, ...) \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ftp)) \
-         Curl_trc_ftp(data, __VA_ARGS__); } while(0)
+#define CURL_TRC_FTP(data, ...)                          \
+  do {                                                   \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ftp)) \
+      Curl_trc_ftp(data, __VA_ARGS__);                   \
+  } while(0)
 #endif /* !CURL_DISABLE_FTP */
 #ifndef CURL_DISABLE_SMTP
-#define CURL_TRC_SMTP(data, ...) \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_smtp)) \
-         Curl_trc_smtp(data, __VA_ARGS__); } while(0)
+#define CURL_TRC_SMTP(data, ...)                          \
+  do {                                                    \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_smtp)) \
+      Curl_trc_smtp(data, __VA_ARGS__);                   \
+  } while(0)
 #endif /* !CURL_DISABLE_SMTP */
 #ifdef USE_SSL
-#define CURL_TRC_SSLS(data, ...) \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
-         Curl_trc_ssls(data, __VA_ARGS__); } while(0)
+#define CURL_TRC_SSLS(data, ...)                          \
+  do {                                                    \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssls)) \
+      Curl_trc_ssls(data, __VA_ARGS__);                   \
+  } while(0)
 #endif /* USE_SSL */
 #ifdef USE_SSH
-#define CURL_TRC_SSH(data, ...) \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssh)) \
-         Curl_trc_ssh(data, __VA_ARGS__); } while(0)
+#define CURL_TRC_SSH(data, ...)                          \
+  do {                                                   \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ssh)) \
+      Curl_trc_ssh(data, __VA_ARGS__);                   \
+  } while(0)
 #endif /* USE_SSH */
 #if !defined(CURL_DISABLE_WEBSOCKETS) && !defined(CURL_DISABLE_HTTP)
-#define CURL_TRC_WS(data, ...)                             \
-  do { if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ws)) \
-         Curl_trc_ws(data, __VA_ARGS__); } while(0)
+#define CURL_TRC_WS(data, ...)                          \
+  do {                                                  \
+    if(Curl_trc_ft_is_verbose(data, &Curl_trc_feat_ws)) \
+      Curl_trc_ws(data, __VA_ARGS__);                   \
+  } while(0)
 #endif /* !CURL_DISABLE_WEBSOCKETS && !CURL_DISABLE_HTTP */
 
 #else /* CURL_HAVE_C99 */
@@ -220,20 +243,22 @@ extern struct curl_trc_feat Curl_trc_feat_write;
 extern struct curl_trc_feat Curl_trc_feat_dns;
 extern struct curl_trc_feat Curl_trc_feat_timer;
 
-#define Curl_trc_is_verbose(data) \
-            ((data) && (data)->set.verbose && \
-            (!(data)->state.feat || \
-             ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
-#define Curl_trc_cf_is_verbose(cf, data) \
-            (Curl_trc_is_verbose(data) && \
-             (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
+#define Curl_trc_is_verbose(data)                          \
+  ((data) && (data)->set.verbose &&                        \
+   (!(data)->state.feat ||                                 \
+    ((data)->state.feat->log_level >= CURL_LOG_LVL_INFO)))
+#define Curl_trc_cf_is_verbose(cf, data)              \
+  (Curl_trc_is_verbose(data) &&                       \
+   (cf) && (cf)->cft->log_level >= CURL_LOG_LVL_INFO)
 #define Curl_trc_ft_is_verbose(data, ft) \
-            (Curl_trc_is_verbose(data) && \
-             (ft)->log_level >= CURL_LOG_LVL_INFO)
+  (Curl_trc_is_verbose(data) &&          \
+   (ft)->log_level >= CURL_LOG_LVL_INFO)
 #define CURL_MSTATE_NAME(s)  Curl_trc_mstate_name((int)(s))
-#define CURL_TRC_EASY_TIMERS(data) \
-  do { if(CURL_TRC_TIMER_is_verbose(data)) \
-         Curl_trc_easy_timers(data); } while(0)
+#define CURL_TRC_EASY_TIMERS(data)      \
+  do {                                  \
+    if(CURL_TRC_TIMER_is_verbose(data)) \
+      Curl_trc_easy_timers(data);       \
+  } while(0)
 
 #else /* CURL_DISABLE_VERBOSE_STRINGS */
 /* All informational messages are not compiled in for size savings */
index a9ff48367f62ca62667404a21beae792360257b7..158d4d044ae78c38e70b561bbe20b486fca45c85 100644 (file)
@@ -21,8 +21,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
+
 #include "dynbuf.h"
 #include "../curl_printf.h"
 
index ac2552a1c35e77dfd3ae5705b00fbf0965d06564..035632af4b40895a68275b8fb9ef5a550ff69eb9 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #include "fopen.h"
index 4cda50df1c46c57236d478cf8d8e7c072956a069..53c079ee26e39d52c70c45918079d543f51aab29 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #include "multibyte.h"
index e3dfdc93d186ebf5e5c342ff28df2e7e6a2e2610..6b4472bab2ad49fd6253068dbbc0b0e297ee7aa3 100644 (file)
@@ -16,7 +16,6 @@
  *
  * SPDX-License-Identifier: ISC
  */
-
 #include "../curl_setup.h"
 
 #ifndef HAVE_INET_NTOP
index 79cdc9e2afea4dfd435d9c82c0f337faad172ef4..45b63d97a5958b327e288e0baed020b5bf5a8387 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef HAVE_INET_NTOP
index 8d356bb3d447927a54ad4b5afe395b449a4448a9..703a7b96cbff9e5089314adaafe6afddba58eb96 100644 (file)
@@ -17,7 +17,6 @@
  *
  * SPDX-License-Identifier: ISC
  */
-
 #include "../curl_setup.h"
 
 #include "strparse.h"
index a52ef145dac5f70f42b2734f7c136c4fc36abf00..fc3ae3d2bb2c20dd9beff7fc3c369addd15f9c94 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef HAVE_INET_PTON
index 71170df2c549d884bc7d0973ac511c3899a0d24d..529091ad92d6ae8ceb5fbc8a9b79c6becddb6ede 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(_WIN32) && defined(UNICODE)
index 23eb8c0e3ab26b4a18457d6de058bc36bd4866a7..96bf3db64ec8c9f1163e45e0ffba018e99402479 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef HAVE_SYS_IOCTL_H
index 7ca1b9a0577138ae447da2fb1a696c916d4e4f1d..01d00880cfa2d89952c2a46dd6cd9db57252f55a 100644 (file)
@@ -22,6 +22,7 @@
  *
  ***************************************************************************/
 #include "../curl_setup.h"
+
 #include "strcopy.h"
 
 /*
index addafd2897b6d814cab79748e9753aa3d945135d..3f1b1f5cd27c516f824ceab887ebc361cd334969 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef HAVE_STRERROR_R
index 66c749b916659acd49e6a2e32cc71474affefaa7..aa78921f5011034c7b111e7a94fd3f075ade367c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "strparse.h"
 
 void curlx_str_init(struct Curl_str *out)
index 58a4dfd3033ca3b56236eb9cb303a714c9e1e62a..694c8d83520673b844cdeb2d67f3b125b74ecb9a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "timediff.h"
 
 /*
index aa224381dd931771d6264cd79af6f0769d167689..e19b0f4403a1138b7b789e612cb7aa9c29b3cfce 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 /* Use a larger type even for 32-bit time_t systems so that we can keep
index 08cc2aba5e5bf5fa8e55d01ce7e1e1159d713279..fa7e528dd6ffb839c59e5c0e35258a4632ee8575 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "timeval.h"
 
 #ifdef _WIN32
index 533e80e5e3c2836e05f0f1a204389466c46f08dc..4aab17519d8bfe74a78f1dfd761fc4ed760b627a 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #include "timediff.h"
index be5b13c9de3c42cd7f6ef6faf129a7eaf51acf12..a9a4ee38f9293d5f876b37fff4b74d20ec9e6174 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef _WIN32
index 471100a66f51c0cc91e1939a99e0894b78a2eb64..a5fb8ff3c23fa8a82c1f747f13d005d246dcf949 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef _WIN32
index f42041961b194dde619e70cb1a25fbb9de4eb792..2a9f54bb3e4eb8655ce48a1c4ff4cdc7ce9e08ce 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifndef HAVE_SELECT
index 208bc20accb18d6698a1bf305a3c5f6d28d57012..c140194a8c2dfae9fa8c9393027e1f9ea5dfbe04 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 int curlx_wait_ms(timediff_t timeout_ms);
index 1b3d88481ab0e82187b45c20e4868d93e8c38d2f..8c1be2d589c8751c353b40254348b0ffd6d3155d 100644 (file)
@@ -21,6 +21,7 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
+#include "../curl_setup.h"
 
 #include "warnless.h"
 
index 290aaac28db4520180d190a5ecc94d9db17866f9..8a62ccf6a70b0416582f9b6e893270e7e5a6db7d 100644 (file)
@@ -24,8 +24,6 @@
  *
  ***************************************************************************/
 
-#include "../curl_setup.h"
-
 #define CURLX_FUNCTION_CAST(target_type, func) \
   (target_type)(void (*)(void))(func)
 
index ad880504a8a2525bf124dcd72a456af40a10f6fa..69fb344fde8ea2c68a7885c2786ad8041f98fb96 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index fce868d4e44f58fa2bd573b54cedce2b473814f1..7de6524bc5801906ed22503ca61eb962f9131fd0 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 struct Curl_easy;
index 69fd675c3820669d538df529d8ef85e64f6024ba..481b9fb27db8fe768b93c82e6850ae5c59c2dcdf 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 4f436059ce5c41848754c5eb6e1e42614e6d1a9a..544cbfa577781eb33c4cc95f0398154946de089b 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 struct Curl_easy;
index 38d79db0571f1f7e8f0fa5642021922685b8d080..5839e804c27637ec8b5154df4b4d077a6b2b7ee4 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_DICT
index ba9a92719ba87a99904bed485a5c14e8c81468c1..4025c8bcdd06962a8c9df34e93f2ebbd67a53284 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #ifndef CURL_DISABLE_DICT
 extern const struct Curl_handler Curl_handler_dict;
 #endif
index 7b7d3c7e2e103fb0fcb5bbd7f37c9208a0dcd4f7..f715b6d30161ef4bf1e1351fe45ed9bc18ea08cb 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_OPENSSL
@@ -60,6 +59,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
   }
   return TRUE;
 }
-#endif /* OpenSSL */
+#endif /* USE_OPENSSL (non-fork) */
 
-#endif /* DLL build */
+#endif /* _WIN32 && !CURL_STATICLIB */
index d7d25694c809f0ee07ef5d22ace58ad58fb2a57d..9052fab26ba3ea9d5661c8a3f225de36dfc71189 100644 (file)
--- a/lib/doh.c
+++ b/lib/doh.c
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_DOH
index 16732173ab673ff979370534a4ae57bff147884a..43bc32346b661d6469973a37f2fbc915938aac3c 100644 (file)
--- a/lib/doh.h
+++ b/lib/doh.h
@@ -179,9 +179,9 @@ UNITTEST void de_init(struct dohentry *d);
 UNITTEST void de_cleanup(struct dohentry *d);
 #endif
 
-#else /* if DoH is disabled */
+#else /* CURL_DISABLE_DOH */
 #define Curl_doh(a, b, c, d, e)    NULL
 #define Curl_doh_is_resolved(x, y) CURLE_COULDNT_RESOLVE_HOST
-#endif
+#endif /* !CURL_DISABLE_DOH */
 
 #endif /* HEADER_CURL_DOH_H */
index 3a4c80de69b3767534610b90f24fa44d5310b494..c69d312f42ff7f86ffd3d44600bf0f10983c09fe 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "dynhds.h"
 #include <nghttp2/nghttp2.h>
 #endif /* USE_NGHTTP2 */
 
-
-static struct dynhds_entry *
-entry_new(const char *name, size_t namelen,
-          const char *value, size_t valuelen, int opts)
+static struct dynhds_entry *entry_new(const char *name, size_t namelen,
+                                      const char *value, size_t valuelen,
+                                      int opts)
 {
   struct dynhds_entry *e;
   char *p;
@@ -45,7 +43,7 @@ entry_new(const char *name, size_t namelen,
   e = curlx_calloc(1, sizeof(*e) + namelen + valuelen + 2);
   if(!e)
     return NULL;
-  e->name = p = ((char *)e) + sizeof(*e);
+  e->name = p = (char *)e + sizeof(*e);
   memcpy(p, name, namelen);
   e->namelen = namelen;
   e->value = p += namelen + 1; /* leave a \0 at the end of name */
index ccdc4f41c4cf4d183ed3e445414d1c2adb61c27c..398b20edd12bdde7b450ef16d2c1ea198e2dc923 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 927b11d70f728571deb8d1825b706ca67b435fc9..10c84c6a5b2b9f22e2f15b2eb4c20e697e40f361 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #define GLOBAL_INIT_IS_THREADSAFE
index 8eb96ebd1719d22c2734120228a8083ba8dbaad3..2685adae957be6b0dfd28eaa9b180cf090b0f2fb 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "easyoptions.h"
index 181ce38f7bc18ee2464dbceb3bf8f6c9d7861bd3..213fd027da4efc4d68718aab8d838b6f31df9408 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Prototypes for library-wide functions provided by easy.c
  */
index e908d15bed967272be56d9531dfe1f6eeb6a04eb..d895653ce923544025c5b6d4623693a21d4a45c8 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* should probably go into the public header */
 
 /* generated table with all easy options */
@@ -32,4 +31,5 @@ extern const struct curl_easyoption Curl_easyopts[];
 #ifdef DEBUGBUILD
 int Curl_easyopts_check(void);
 #endif
-#endif
+
+#endif /* HEADER_CURL_EASYOPTIONS_H */
index 24d4c4e42c8735fadbb5793b7696fa8034148921..afdf18c1b4d91ed7c4c800fc7269615190d6917a 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* Escape and unescape URL encoding in strings. The functions return a new
  * allocated string or NULL if an error occurred. */
-
 #include "curl_setup.h"
 
 struct Curl_easy;
@@ -62,7 +60,7 @@ char *curl_easy_escape(CURL *data, const char *string, int inlength)
   if(!length)
     return curlx_strdup("");
 
-  if(length > SIZE_MAX/16)
+  if(length > SIZE_MAX / 16)
     return NULL;
 
   curlx_dyn_init(&d, length * 3 + 1);
index d4173dbaa2e81952ae966f2062c4d18d04d47b97..bf5a44892c5d2be4ab1414c34b7922218a7d4aaa 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "fake_addrinfo.h"
index 4612aa02cb1741f9fcdd1d4d6d6d5ffdc69dc09d..db701be40aa4601005198d88236b1b5fc395de4b 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_ARES
index a8617c213a298b3c8843739a631f1c251074409c..8d171374a5616707d988b779c837297888e758f4 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FILE
index fea1eea57d6c9505f167b283be7ab611fca9a8b9..cb3552d924dcb75c1596fd8f36b0cec42c8ecd83 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #ifndef CURL_DISABLE_FILE
 extern const struct Curl_handler Curl_handler_file;
 #endif
index 83d2ef0d005f3c51de3729d0ef8492b875a1965c..33e5acde013c07f1f8bd479fb4c189d428bf0236 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FTP
@@ -42,4 +41,4 @@ void Curl_fileinfo_cleanup(struct fileinfo *finfo)
   curlx_free(finfo);
 }
 
-#endif
+#endif /* !CURL_DISABLE_FTP */
index a17b8d3426d02ab4bc5a39c9a2b0ed9b3dc26dbe..737966788cdd802700293507cc3a1ff34c26e67a 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "llist.h"
index 576b64449661e668bb905e3d916e410424f8843c..8c4dc4830b8c7e6dd5769bc2efd8043f2b9d1401 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 struct Curl_easy;
index 4ece7d06e71e3cae6cb8166033378bfbcdb99c79..ce592a8fd9d02510d89a62834f9a155c37046873 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FORM_API
index 650c2ee9924c188fa99d976424329e32ac21623f..13fae6a4e48e5734c86643604181e8c41ac3af3e 100644 (file)
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_FTP
index f4ddb1a37cc3943e55ca8d7f9ea61856f84d5f99..0e32d39832dba466e06444a7b46f7ca9f9b24c2c 100644 (file)
--- a/lib/ftp.h
+++ b/lib/ftp.h
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "pingpong.h"
index 5836f1cec3b30d878b30b9cd025468c37715f353..f82895d57a233e90a531656ef0ec6de2f590840e 100644 (file)
@@ -21,6 +21,9 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
+#include "curl_setup.h"
+
+#ifndef CURL_DISABLE_FTP
 
 /**
  * Now implemented:
  * 01-29-97 11:32PM <DIR> prog
  */
 
-#include "curl_setup.h"
-
-#ifndef CURL_DISABLE_FTP
-
 #include "urldata.h"
 #include "fileinfo.h"
 #include "llist.h"
@@ -1089,4 +1088,4 @@ fail:
   return retsize;
 }
 
-#endif /* CURL_DISABLE_FTP */
+#endif /* !CURL_DISABLE_FTP */
index ad8dee74386a116d60949764e80a674bd8bd7844..afb90dee4cada77f126f9a85461f8ffd814981a2 100644 (file)
@@ -70,8 +70,8 @@ void Curl_wildcard_dtor(struct WildcardData **wcp);
 
 struct Curl_easy;
 
-#else
-/* FTP is disabled */
+#else /* CURL_DISABLE_FTP */
 #define Curl_wildcard_dtor(x)
-#endif /* CURL_DISABLE_FTP */
+#endif /* !CURL_DISABLE_FTP */
+
 #endif /* HEADER_CURL_FTPLISTPARSER_H */
index 92f6b45cd2002e187665203ed79b7f5e31192550..ba754f99b60e677f4334fd4937b2477c7dccb4a0 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 /* defaults:
index 1955649ace8affdd05b61460075b47ee4ff65985..a957e6e8019939ec2ac67533734d828c86e7d106 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 char *curl_getenv(const char *variable)
index 1f429b2227e224ac7e815a65dc0ca9ed9bc3a9f5..e094ffd134e0be3085820f8d3c5f3b3f6a75c62a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 826de91512c188b1d9a43f81452b16f7c2e55052..186530de9f18c5ac2ccb36b09a050a222e76507a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_GOPHER
index 9e3365b71c25781c0839842d79b24c78e97cfe9e..1e6a5d2d30e6902674e43e29a7d46d2f9a8b2f5d 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #ifndef CURL_DISABLE_GOPHER
 extern const struct Curl_handler Curl_handler_gopher;
 #ifdef USE_SSL
index 9ef80dffe99087b98ecaffc610ac2bf9c24106ae..0b6ecc48f7d52d388c7fce4dda3e85ef3055084e 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "hash.h"
@@ -32,7 +31,6 @@
 #define ITERINIT 0x5FEDCBA9
 #endif
 
-
 #if 0 /* useful function for debugging hashes and their contents */
 void Curl_hash_print(struct Curl_hash *h, void (*func)(void *))
 {
index f669fa58013469b6a27768813387e2640e62fa82..8bf47ccf753dd8043f001ad47f545893cd424ef8 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 /* Hash function prototype */
index 5ad73dad01b65894cf6da1604f2d14bf855578e1..c1880453540c5aa9b4a3315beb20dfc03040e063 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index f9248b09774e5b22078d915233ad3d56b86e91d4..9080588341da6efd0262f244873d5b993c9b273f 100644 (file)
@@ -23,7 +23,6 @@
  * RFC2104 Keyed-Hashing for Message Authentication
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) ||      \
index aba12ef791ff2f1e5ed6eed96fb4522d8589d883..640010c94ac59b58d0e5ad6c4e61f6839311ced5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 8964d29af995a22330a867f2e3881cc5b9b32891..6f8e98218edead60eab894788e1f107af98ab2cb 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "hash.h"
index 785ca249331685fae6c06307926de543b26d3c30..422e0b222a80217aac8e86ff375bbe292f16c176 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 /***********************************************************************
index d0d67196c4b3faec22929a72f56cadd5f55759a9..e4793d7a68bb80189a7d3601ed6e81e3585f6ea1 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 /***********************************************************************
index 8a95c6ba6ffcff13bf1eaaf52fff41b779a4545c..3e52efa8d192ca2d7baa7e79be56ffb9d8b3323f 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
index e12dd32c5a06e2728289fef7865c1832fb1e63e4..9e584248bedd5532edd81a09267a4770304769c5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
index 88bd99798e055f0bf886653b44bbe321f455191c..124d32e373cb497fbb2a0e752a18979be32ac614 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
index 061c4d67fb986cbf2391a5eaebbb1a12990830bb..e0c447ac7e45a6498628f6ed10becf528a3eb4c3 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_NGHTTP2)
index b47cccecc8b2720dc4485de9936ce70507a4d622..950b2f7b283314e083a8c507e343d0eeaaacca05 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_NGHTTP2
index d2493b0b0ead6ac5cbcadf01a4da8d8bef597d7d..a01b72202dea0c88ce070c79f2b2da329ec6a0f6 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_AWS)
index 73f93c2bce78e0cc61a84dd51c33645d373907d8..f78a89e54f5b32340d504527b6a76a0e990fa426 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_HTTP
index 34aba0e3ba2fe603bac7e8d14b2f97eb58733043..ccc67f5efcef939ddf1c77274ec2e463f1134864 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
index 46cffb0bda19bf6762b60c2d8b806cdb9deece65..5f797310fd9c507627429bebf5f4a1a596190de8 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_DIGEST_AUTH)
index a8e715a7b9f8f9bc914cad376aa22db0286820f1..be1063d92d29fbe4cac04237f1b83a7b85228c52 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
index 8e56e9dea3984ff2f5b001f203694028e6937cc0..6c285f152f2703c08d1d1dfc6068452c390a153f 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_SPNEGO)
index e5c97269b1d95f63fb410a29b4a29ae9caf481ce..c4dbdf9ca5d1b78395e41e4b6baba0fe647a1f46 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)
index b38ff82dba3cc61fb74488f97a5e4a8536691c9c..ff5218d89f6cd740ceb878a6cd7c1e21047f2cf9 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_NTLM)
index 088954f230a37784698bee85ff9e4b80e3df33ed..c5b2f3e87170a18fa910aa877529e81b4d6d5976 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "http_proxy.h"
@@ -437,4 +436,4 @@ out:
   return result;
 }
 
-#endif /* ! CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
+#endif /* !CURL_DISABLE_HTTP && !CURL_DISABLE_PROXY */
index 7af2ebb284c9cfd42a5ba0293d4a3c1e110642df..c27787b3a51a0628d573138a85df2a374d462b30 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
index 7013be5b6665900674da75ca045229e6ceed5759..d642a4c9049f091f6219b10d88f68dea5f7adac5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_HTTPSRR
index 4259a03262f330f678849fe111d773ffd0334da8..8fe7c0c85c5026830d8679d6e065c75d7f6669bd 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_ARES
index b3618c2de399504d5e9d4e4c39f247b69240c383..f055882e23720bcd08b1d341c7ad42042119bd28 100644 (file)
--- a/lib/idn.c
+++ b/lib/idn.c
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * IDN conversions
  */
-
 #include "curl_setup.h"
 
 #include "urldata.h"
@@ -41,7 +39,7 @@
 #define IDN2_LOOKUP(name, host, flags)                          \
   idn2_lookup_ul((const char *)name, (char **)host, flags)
 #endif
-#endif  /* USE_LIBIDN2 */
+#endif /* USE_LIBIDN2 */
 
 /* for macOS and iOS targets */
 #ifdef USE_APPLE_IDN
index 2bdce8927f9e9f4359b86698de488dad20d65811..42613af5096c058f000c2a8809e88d0f6c6844a2 100644 (file)
--- a/lib/idn.h
+++ b/lib/idn.h
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 bool Curl_is_ASCII_name(const char *hostname);
 CURLcode Curl_idnconvert_hostname(struct hostname *host);
+
 #if defined(USE_LIBIDN2) || defined(USE_WIN32_IDN) || defined(USE_APPLE_IDN)
 #define USE_IDN
 void Curl_free_idnconverted_hostname(struct hostname *host);
 CURLcode Curl_idn_decode(const char *input, char **output);
 CURLcode Curl_idn_encode(const char *input, char **output);
-
 #else
 #define Curl_free_idnconverted_hostname(x)
 #define Curl_idn_decode(x) NULL
 #endif
+
 #endif /* HEADER_CURL_IDN_H */
index ef2bfe2b0a4885258cbf99a4bb7ca53beffd39e0..d940c871bc7fcc94abc3c73185f5d689a2b73a8a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 18405e7b4407f71622c237341c2bbebb0b36a691..0af18780d4c7951653661d67430b7f23f35209ef 100644 (file)
@@ -34,7 +34,6 @@
  * Draft   LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_IMAP
index 4433dcf0356ded1bfa738e557cbc99b2e3a75c6a..26306a6a22fc15eedca18503d284ed63ac46572d 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 extern const struct Curl_handler Curl_handler_imap;
 extern const struct Curl_handler Curl_handler_imaps;
 
index cad6203eeb355752ba05f53e845ab32a91b8ea59..71871fc742b19025c6ccd7d96f6257b8f0f030dd 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP)
index ce8e064280eaa746a66648cbafd576a18a954d51..0e3084b5704180864a6ce0fbe63bf930e1193208 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "llist.h"
index d90dd68463175c16845cced5a6a22ff1262dd6f5..1d73db1719da962379938387032ac1b38f0d1052 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 typedef void (*Curl_llist_dtor)(void *user, void *elem);
index 8c49a07b8dd052b6a0725e0d31e8fe5f62c459fc..334dbc7d1d38fd2890ee30ccf956a406faf57cdc 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef CURL_MACOS_CALL_COPYPROXIES
index 637860e80fc1ba31d50d09b4a378452ef711d7ed..0a72a30272673d7da8ece0c3d4d74efd57a1c5b6 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef CURL_MACOS_CALL_COPYPROXIES
-
 CURLcode Curl_macos_init(void);
-
 #else
-
 #define Curl_macos_init() CURLE_OK
-
 #endif
 
 #endif /* HEADER_CURL_MACOS_H */
index 535369579562c81ef7439aa00d05181970c8bebb..e7ecf58ec8a9909e6d491bc3a0fa323db0f8f1e6 100644 (file)
--- a/lib/md4.c
+++ b/lib/md4.c
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_CURL_NTLM_CORE
index 12997d175d76255621b9f6168c53cdcc7c8cbcc0..3e068cc59fe0e84a2aef4e8bbcef132f1d5d8d37 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if (defined(USE_CURL_NTLM_CORE) && !defined(USE_WINDOWS_SSPI)) || \
index 2dd3aa0bfa61321ec43e30fc1ff7c778ea47e8a1..a99972fd13fb67ebf7f30a27b7c31a6d94b0a413 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef CURLDEBUG
index 011201a7cb8268b5a03ba06cb31bbe389c8ced54..37b50de3a0fc405aab6d62c34cabf29a42a69287 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 struct Curl_easy;
index 3ac196180bff5a63caac30a907c0659f59425d7d..81080b449f3ffa98f674d99e581deed28d31ab57 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #define MIME_BOUNDARY_DASHES            24  /* leading boundary dashes */
index 39f45901ed646565d6d31a73357013beeb75a06c..50ede212a41588e029651d8b15bff261cc2ea4c5 100644 (file)
@@ -20,8 +20,7 @@
  *
  * SPDX-License-Identifier: curl
  *
- */
-
+ ***************************************************************************/
 #include "curl_setup.h"
 
 #include "curlx/dynbuf.h"
index bc9671cc1796ebabb21d33350876b297e6cd2b90..74ba90a4a7a1f7fe44f533dd3b418a982f715f4b 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_MQTT
index 8fb8a33c022a870def1fcbad63f70b8f1e6e0a31..3e45815ba90b9834ff8f4b5a18aebedb459d92bc 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #ifndef CURL_DISABLE_MQTT
 extern const struct Curl_handler Curl_handler_mqtt;
 #endif
index 1dd858d1898f34d791eb598c3fff73095cd83eeb..92f6ca764dc39fc16ccd124760660ac979440b1e 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 5d55ed8ebcee13bca86b274577ef40950c6dff23..deebb970f34d54fa202c4c44114282cfeb3306b5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 4e5b2a454d2670950a01ae538a9ea56bf3504988..ddbb9331d3c418c058c37fd743cee75ccdca03d0 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "hash.h"
 
 struct Curl_easy;
index c41743719e924f7840a54528a0f47d08ba334758..4921fc55d54fbea64981ab7b6ff725dedc0077ae 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 2f1f34435756b9a9fe45a7596ff57f0399cbab19..05df2d6681b6f6aa2d4b40afd8aa7c7523406578 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "uint-bset.h"
 
 struct Curl_easy;
index 2bf06322a8990a090eb851bf49b39d3c19d51002..f66853f5f0f89ec3022b650e713acc6e52161e90 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "llist.h"
 #include "hash.h"
 #include "conncache.h"
index f4dc24a3e97a44829a1a4525e4661a26f00b4c8f..3695674e4a30b652a98c39672361343ac0f66cc2 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Prototypes for library-wide functions provided by multi.c
  */
index fe0380066b1bee3d8ab0d97d7f1556d572c6c780..0678733d22f226297390697c390e89a6710309c1 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_NETRC
index af07c812a5d8e0cc3fb77be0df1fce344b55891f..99ddc6253e08da0840eeadec71d9879d43b4acec 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_NETRC
+
 #include "curlx/dynbuf.h"
 
 struct store_netrc {
index 5c0c58530debb755ad959ddb4da9126dc94f1d44..541765b6502e1be9f1986f99d9a5a9c6af534995 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_PROXY
index e78080ab83f3259c446b0beb820753c6587b49da..f826a4d00673f6e25c206304b7760b390d9c5e46 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)
index b622b5ad907399ba850745fa1c197551e15316d1..9b4c483858af82bdb1cbc002bdd6e3e419edb7c6 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
+#include "curl_setup.h"
+
+#include "parsedate.h"
+#include "curlx/strparse.h"
+
 /*
   A brief summary of the date string formats this parser groks:
 
 
 */
 
-#include "curl_setup.h"
-
-#include "parsedate.h"
-#include "curlx/strparse.h"
-
 /*
  * parsedate()
  *
index ef2578098d5f402a550cb4861c0f54f436d2cd46..a6ee43a5d487c425b744c3451cc2dbbf26e55466 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 extern const char * const Curl_wkday[7];
 extern const char * const Curl_month[12];
 
index 8c5cf05fc219e56d95e982ccf71cf207e2b0c0d5..5af53052559e8ade2aee22b5c052eb201518fe63 100644 (file)
@@ -24,7 +24,6 @@
  *   IMAP, POP3, SMTP and whatever more that likes them.
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index b3780571c480e5a503e15155e09a1f0cdedb3ee3..a7292e6003213e4f15b9bd114431c1b6dd9d8ed9 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \
index 97a34ff4d88d10acbb6bf4211f6bb57117cb4bc0..8e2c8aa32e55e137f64f93187cf9a7d0f40438ff 100644 (file)
@@ -36,7 +36,6 @@
  * Draft   LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_POP3
index 485e7c2c493d46c9900cd1ab6b84994aa724e1b6..ed00dd15ae46cbd1e0af49a1ca6c4ea53e2dad0e 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 extern const struct Curl_handler Curl_handler_pop3;
 extern const struct Curl_handler Curl_handler_pop3s;
 
index fc0164c1725ac145da5ee70db20d5661ad7d8beb..6493f748ebc06c1de5146e4397e8c3df066c3726 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index f368c2475ef937df6c9ea75fc5185ed9a0fcfd87..e604a499edc1f562aac970bfcc292dd2f8f2a98b 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/timeval.h"
 
 struct Curl_easy;
index 5346a57fcec65484e7b82f57d5a945075b737652..e2488aea22153b337d49ee2bbd6ea9dc93245c28 100644 (file)
--- a/lib/psl.c
+++ b/lib/psl.c
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_LIBPSL
index dc11469a5248533c3b0924ed496f894e5e838c3c..97871f963462f07edc8961c6978a796b5bc5b75f 100644 (file)
--- a/lib/psl.h
+++ b/lib/psl.h
@@ -23,8 +23,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #ifdef USE_LIBPSL
+
 #include <libpsl.h>
 
 struct Curl_easy;
index 4689a04b006a4ec7fc89dec2af0217816fe7a0a2..25ecdf1086a330ce2d3ce9f546c736cc2cea37b5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_ARPA_INET_H
index 674cb6ee2025511c92c940ce857486ff5ab00fa3..03c69a0df460f64a88df44a55b3cc44d31c28d7c 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 CURLcode Curl_rand_bytes(struct Curl_easy *data,
 #ifdef DEBUGBUILD
                          bool allow_env_override,
index feafe669c1784e396c07720f074464bbcda7c60f..5f87c966a5b2adfcf89130e96568cec6dbaf639c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "curlx/timeval.h"
index aa576451263c702b27c06bd5bd89a47f68326fa0..07f11b8ff472b770705de24f3098151f1044a198 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curlx/timeval.h"
 
 struct Curl_easy;
index c8781b70bf482ef6c402dea37dc0c3f74c4fc022..90c10af99c4ef5055a8d15c493969151bc2a7481 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 5b0d1460283b3a5f0ce01fed123bbaeebd00d272..0b006dc77ce45b845dd981c62e777be7205f6c53 100644 (file)
@@ -23,9 +23,7 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* This file is for lib internal stuff */
-
 #include "curl_setup.h"
 
 #include "bufq.h"
index 063ab7eb925d07f2d1347609d42f1fb2e44883b2..3d705564003488e97b7eb265816eb96cf1cf1c11 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_RTSP
index 7b42efde2860277351ec32ea87756f7285617cc3..70ca00f69a8bf7e90f6833b040da6fdf607a9bee 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #ifndef CURL_DISABLE_RTSP
-
 extern const struct Curl_handler Curl_handler_rtsp;
-
 CURLcode Curl_rtsp_parseheader(struct Curl_easy *data, const char *header);
-
 #else
-/* disabled */
 #define Curl_rtsp_parseheader(x, y) CURLE_NOT_BUILT_IN
-
-#endif /* CURL_DISABLE_RTSP */
+#endif
 
 #endif /* HEADER_CURL_RTSP_H */
index 5761084242d14eab869f8f6558cd98ff6c8bdfdd..cae5085fdcf0b97c3c488f086538112f50f5a318 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(HAVE_SELECT) && !defined(HAVE_POLL)
@@ -263,7 +262,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
       ufds[i].revents |= POLLIN | POLLOUT;
   }
 
-#else  /* HAVE_POLL */
+#else /* !HAVE_POLL */
 
   FD_ZERO(&fds_read);
   FD_ZERO(&fds_write);
@@ -329,7 +328,7 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
       r++;
   }
 
-#endif  /* HAVE_POLL */
+#endif /* HAVE_POLL */
 
   return r;
 }
index c5f1c59be02ff9d89d6cf1834e6da9dbe3d82d0b..268ae7cecfd4f9a1e806f506f240448adaeb6017 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_POLL_H
index 96f5c49e0d552c72a6b17144d42d4bf8cf9486fc..2d66ed58dd77fcca6500163188d8c63ead800379 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index a11010d8ad6a7f891c39ed20822009fda7000957..1521ccb0f86614d0f2e1a948c988df6026514e8e 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 /**
index 5c0edfa01fa38509863419658d3adf700b8bc075..06e7dd1b862bb63e33b4c2193118a60ea9666d6c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
@@ -314,7 +313,7 @@ static CURLcode setopt_HTTP_VERSION(struct Curl_easy *data, long arg)
   data->set.httpwant = (unsigned char)arg;
   return CURLE_OK;
 }
-#endif /* ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_HTTP */
 
 #ifdef USE_SSL
 CURLcode Curl_setopt_SSLVERSION(struct Curl_easy *data, CURLoption option,
@@ -351,7 +350,7 @@ CURLcode Curl_setopt_SSLVERSION(struct Curl_easy *data, CURLoption option,
   }
   return CURLE_OK;
 }
-#endif /* ! USE_SSL */
+#endif /* !USE_SSL */
 
 #ifndef CURL_DISABLE_RTSP
 static CURLcode setopt_RTSP_REQUEST(struct Curl_easy *data, long arg)
@@ -412,7 +411,7 @@ static CURLcode setopt_RTSP_REQUEST(struct Curl_easy *data, long arg)
   data->set.rtspreq = rtspreq;
   return CURLE_OK;
 }
-#endif /* ! CURL_DISABLE_RTSP */
+#endif /* !CURL_DISABLE_RTSP */
 
 #ifdef USE_SSL
 static void set_ssl_options(struct ssl_config_data *ssl,
@@ -583,7 +582,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option,
     else
       s->method = HTTPREQ_GET;
     break;
-#endif /* ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_HTTP */
 #ifndef CURL_DISABLE_PROXY
   case CURLOPT_HTTPPROXYTUNNEL:
     /*
@@ -621,7 +620,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option,
      */
     s->proxy_transfer_mode = enabled;
     break;
-#endif /* ! CURL_DISABLE_PROXY */
+#endif /* !CURL_DISABLE_PROXY */
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   case CURLOPT_SOCKS5_GSSAPI_NEC:
     /*
@@ -684,7 +683,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option,
      */
     s->tftp_no_options = enabled;
     break;
-#endif /* ! CURL_DISABLE_TFTP */
+#endif /* !CURL_DISABLE_TFTP */
   case CURLOPT_TRANSFERTEXT:
     /*
      * This option was previously named 'FTPASCII'. Renamed to work with
@@ -727,7 +726,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option,
     s->doh_verifystatus = enabled;
     ok = 2;
     break;
-#endif /* ! CURL_DISABLE_DOH */
+#endif /* !CURL_DISABLE_DOH */
   case CURLOPT_SSL_VERIFYHOST:
     /*
      * Enable verification of the hostname in the peer certificate
@@ -790,7 +789,7 @@ static CURLcode setopt_bool(struct Curl_easy *data, CURLoption option,
   case CURLOPT_SSH_COMPRESSION:
     s->ssh_compression = enabled;
     break;
-#endif /* ! USE_SSH */
+#endif /* !USE_SSH */
 #ifndef CURL_DISABLE_SMTP
   case CURLOPT_MAIL_RCPT_ALLOWFAILS:
     /* allow RCPT TO command to fail for some recipients */
@@ -983,7 +982,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
     s->expect_100_timeout = (unsigned short)arg;
     break;
 
-#endif /* ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_HTTP */
 
 #ifndef CURL_DISABLE_MIME
   case CURLOPT_MIME_OPTIONS:
@@ -1011,7 +1010,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
       return CURLE_NOT_BUILT_IN;
     s->socks5auth = (unsigned char)uarg;
     break;
-#endif /* ! CURL_DISABLE_PROXY */
+#endif /* !CURL_DISABLE_PROXY */
 
 #ifndef CURL_DISABLE_FTP
   case CURLOPT_FTP_FILEMETHOD:
@@ -1032,14 +1031,14 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
     break;
   case CURLOPT_ACCEPTTIMEOUT_MS:
     return setopt_set_timeout_ms(&s->accepttimeout, arg);
-#endif /* ! CURL_DISABLE_FTP */
+#endif /* !CURL_DISABLE_FTP */
 #if !defined(CURL_DISABLE_FTP) || defined(USE_SSH)
   case CURLOPT_FTP_CREATE_MISSING_DIRS:
     if((arg < CURLFTP_CREATE_DIR_NONE) || (arg > CURLFTP_CREATE_DIR_RETRY))
       return CURLE_BAD_FUNCTION_ARGUMENT;
     s->ftp_create_missing_dirs = (unsigned char)arg;
     break;
-#endif /* ! CURL_DISABLE_FTP || USE_SSH */
+#endif /* !CURL_DISABLE_FTP || USE_SSH */
   case CURLOPT_INFILESIZE:
     if(arg < -1)
       return CURLE_BAD_FUNCTION_ARGUMENT;
@@ -1198,7 +1197,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
     data->state.rtsp_next_server_CSeq = arg;
     break;
 
-#endif /* ! CURL_DISABLE_RTSP */
+#endif /* !CURL_DISABLE_RTSP */
 
   case CURLOPT_TCP_KEEPIDLE:
     result = value_range(&arg, 0, 0, INT_MAX);
@@ -1254,7 +1253,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
     else
       Curl_hsts_cleanup(&data->hsts);
     break;
-#endif /* ! CURL_DISABLE_HSTS */
+#endif /* !CURL_DISABLE_HSTS */
 #ifndef CURL_DISABLE_ALTSVC
   case CURLOPT_ALTSVC_CTRL:
     if(!arg) {
@@ -1267,7 +1266,7 @@ static CURLcode setopt_long(struct Curl_easy *data, CURLoption option,
         return CURLE_OUT_OF_MEMORY;
     }
     return Curl_altsvc_ctrl(data->asi, arg);
-#endif /* ! CURL_DISABLE_ALTSVC */
+#endif /* !CURL_DISABLE_ALTSVC */
 #ifndef CURL_DISABLE_WEBSOCKETS
   case CURLOPT_WS_OPTIONS:
     s->ws_raw_mode = (bool)(arg & CURLWS_RAW_MODE);
@@ -1406,8 +1405,8 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
     Curl_safefree(data->state.formp);
     data->state.mimepost = NULL;
     break;
-#endif /* ! CURL_DISABLE_FORM_API */
-#endif /* ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_FORM_API */
+#endif /* !CURL_DISABLE_HTTP */
 #if !defined(CURL_DISABLE_HTTP) || !defined(CURL_DISABLE_SMTP) || \
   !defined(CURL_DISABLE_IMAP)
 # ifndef CURL_DISABLE_MIME
@@ -1428,8 +1427,8 @@ static CURLcode setopt_pointers(struct Curl_easy *data, CURLoption option,
 #endif
     }
     break;
-#endif /* ! CURL_DISABLE_MIME */
-#endif /* ! disabled HTTP, SMTP or IMAP */
+#endif /* !CURL_DISABLE_MIME */
+#endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_SMTP || !CURL_DISABLE_IMAP */
   case CURLOPT_STDERR:
     /*
      * Set to a FILE * that should receive all error writes. This
@@ -1711,7 +1710,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
     Curl_safefree(s->str[STRING_COPYPOSTFIELDS]);
     s->method = HTTPREQ_POST;
     break;
-#endif /* ! CURL_DISABLE_HTTP || ! CURL_DISABLE_MQTT */
+#endif /* !CURL_DISABLE_HTTP || !CURL_DISABLE_MQTT */
 
 #ifndef CURL_DISABLE_HTTP
   case CURLOPT_ACCEPT_ENCODING:
@@ -1795,7 +1794,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
     return cookielist(data, ptr);
 #endif /* !CURL_DISABLE_COOKIES */
 
-#endif /* ! CURL_DISABLE_HTTP */
+#endif /* !CURL_DISABLE_HTTP */
 
   case CURLOPT_CUSTOMREQUEST:
     /*
@@ -2042,7 +2041,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
      * proxy exception list
      */
     return Curl_setstropt(&s->str[STRING_NOPROXY], ptr);
-#endif /* ! CURL_DISABLE_PROXY */
+#endif /* !CURL_DISABLE_PROXY */
 
   case CURLOPT_RANGE:
     /*
@@ -2400,7 +2399,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
   case CURLOPT_INTERLEAVEDATA:
     s->rtp_out = ptr;
     break;
-#endif /* ! CURL_DISABLE_RTSP */
+#endif /* !CURL_DISABLE_RTSP */
 #ifndef CURL_DISABLE_FTP
   case CURLOPT_CHUNK_DATA:
     s->wildcardptr = ptr;
@@ -2518,7 +2517,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
     }
     break;
   }
-#endif /* ! CURL_DISABLE_HSTS */
+#endif /* !CURL_DISABLE_HSTS */
 #ifndef CURL_DISABLE_ALTSVC
   case CURLOPT_ALTSVC:
     if(!data->asi) {
@@ -2532,7 +2531,7 @@ static CURLcode setopt_cptr(struct Curl_easy *data, CURLoption option,
     if(ptr)
       return Curl_altsvc_load(data->asi, ptr);
     break;
-#endif /* ! CURL_DISABLE_ALTSVC */
+#endif /* !CURL_DISABLE_ALTSVC */
 #ifdef USE_ECH
   case CURLOPT_ECH: {
     size_t plen = 0;
index b653100d5dd4946326cab3caa5e6b51e983eed41..7c3cad33bfa4bfa4f776c9e9c5a7b4ac17a68a79 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_AWS) || !defined(CURL_DISABLE_DIGEST_AUTH) || \
index 3be71cb728dd88cd7fd1a330866f94b56b9ad3d5..9bfd08ae2ce138477d75f003fca9740537fdd4fc 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "slist.h"
index 5f3e419a420b2bf3002f213f479ae9a5b572921d..003a38f19f0f1fb05c35c9b38687409ae65e2b81 100644 (file)
--- a/lib/smb.c
+++ b/lib/smb.c
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE)
@@ -1112,9 +1111,9 @@ static CURLcode smb_request_state(struct Curl_easy *data, bool *done)
       next_state = SMB_CLOSE;
       break;
     }
-    len = Curl_read16_le(((const unsigned char *)msg) +
+    len = Curl_read16_le((const unsigned char *)msg +
                          sizeof(struct smb_header) + 11);
-    off = Curl_read16_le(((const unsigned char *)msg) +
+    off = Curl_read16_le((const unsigned char *)msg +
                          sizeof(struct smb_header) + 13);
     if(len > 0) {
       if(off + sizeof(unsigned int) + len > smbc->got) {
@@ -1141,7 +1140,7 @@ static CURLcode smb_request_state(struct Curl_easy *data, bool *done)
       next_state = SMB_CLOSE;
       break;
     }
-    len = Curl_read16_le(((const unsigned char *)msg) +
+    len = Curl_read16_le((const unsigned char *)msg +
                          sizeof(struct smb_header) + 5);
     data->req.bytecount += len;
     data->req.offset += len;
index aa0be881c13342a91f82720a2c262fb908ed6954..474f8d6a5f7b7cd600c5fbe89bb596a8b25ba039 100644 (file)
--- a/lib/smb.h
+++ b/lib/smb.h
@@ -24,7 +24,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #if !defined(CURL_DISABLE_SMB) && defined(USE_CURL_NTLM_CORE) && \
   (SIZEOF_CURL_OFF_T > 4)
 
index bfd238a13ba034a5af79a60df7c8d0f8ce05c94d..471c8231528903bb1d54182afd50f8ea8c116e61 100644 (file)
@@ -38,7 +38,6 @@
  * Draft   LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_SMTP
index 5111c62ae6e34ae8f236e3707a3f72f82300d408..7e3cf774ae88cecf55ff559eb70386d97d909e8f 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 extern const struct Curl_handler Curl_handler_smtp;
 extern const struct Curl_handler Curl_handler_smtps;
 
index 2e2d375e063ae5af0bb1c812da6fa5f8f4fdd094..2b0333508763c158247d990ae5ae9930cdd908ab 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 struct Curl_sockaddr_storage {
index 756fd7f181eacb3e6c3d9d3e5939a1d24b498c2c..69b42da04cb9204236efca918abdf5ac03a07c7a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "socketpair.h"
@@ -221,14 +220,14 @@ int Curl_socketpair(int domain, int type, int protocol,
           goto error;
         if(
 #ifdef USE_WINSOCK
-          /* This is how Windows does it */
-          (SOCKEWOULDBLOCK == sockerr)
+           /* This is how Windows does it */
+           (SOCKEWOULDBLOCK == sockerr)
 #else
-          /* errno may be EWOULDBLOCK or on some systems EAGAIN when it
-             returned due to its inability to send off data without
-             blocking. We therefore treat both error codes the same here */
-          (SOCKEWOULDBLOCK == sockerr) || (EAGAIN == sockerr) ||
-          (SOCKEINTR == sockerr) || (SOCKEINPROGRESS == sockerr)
+           /* errno may be EWOULDBLOCK or on some systems EAGAIN when it
+              returned due to its inability to send off data without
+              blocking. We therefore treat both error codes the same here */
+           (SOCKEWOULDBLOCK == sockerr) || (EAGAIN == sockerr) ||
+           (SOCKEINTR == sockerr) || (SOCKEINPROGRESS == sockerr)
 #endif
           ) {
           continue;
index a839a2c50d09480bce5a1df81521c9f290754b55..36685e71a5f49b8bca628fb8975ef2603d31c725 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_EVENTFD
index 53062145571864cc4df20d4ad4fac1114be9411a..ee89e892983a18a86c552db61250fe4d87df05b6 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_PROXY
index 7c43e92e7e1264f453e1be66689c2f567c1b6a96..520fb75ddbadb6e4bf469f9e1c02588b3a074329 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_PROXY
@@ -54,4 +53,4 @@ extern struct Curl_cftype Curl_cft_socks_proxy;
 
 #endif /* !CURL_DISABLE_PROXY */
 
-#endif  /* HEADER_CURL_SOCKS_H */
+#endif /* HEADER_CURL_SOCKS_H */
index ce493c03931c3d28f43c7facfbbb9ae390d9bfde..1c2bfee987c375835bb9de55f2788a5f56032295 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if defined(HAVE_GSSAPI) && !defined(CURL_DISABLE_PROXY)
index 4a206a06ad07b08b605616b762dce16fd784d8f7..5e9e49f2a908029456c034853d1412efd292cd3d 100644 (file)
@@ -22,7 +22,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_PROXY)
index a95eb10d8502dcffafed7019d40abd925083fa16..92a4b16199fa70c01655e237e396b3b79c7f0bed 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "curlx/timeval.h"
index f36d2b8f108f6bc3816c7b69fd29b805bf4e23d2..34ccae35de16e72d6b281eba5d11e885f04b7648 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "strcase.h"
index 060ebba6e5a6d1423702b424c4e80e83cbd9104d..3a7f126790633c367f84a502e37690ce8c57a48a 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 char Curl_raw_toupper(char in);
index 99976a5deaedec0629df97aa77abcbd1af9b9ea3..f666571e3eac90cbfad4059847b9db433e7a2b57 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef _WIN32
index 14edad7e8c28aaef4ab9b00f6b1c3f2834f013a9..98cecdc244d4d3724cee85a0a3c856cf1415de11 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "strcase.h"
index 6c655f4fe65e13406a3ec09fcbd6680afd266d1c..b281b1886aef4dd5c6d68cf277bc7c104a5e12b9 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_WINDOWS_SSPI
index a10164c9da0bfa24e289fe24fdc9f8bda22c0cb5..4b9779ff2d3cc6a9bc9bc7e8d94b24205d43418d 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_WINDOWS_SSPI
index a53f61724e0921fa97dce7edf9e6cb0fb2260300..0e03e7cd6fc837afb57ba724a7c54aad4b7239ad 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef _WIN32
index e3ed0547fed20225080015cce062802017aba983..c7df2a5c0d5b818b03c3c58ce3efa44b88f83105 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef _WIN32
@@ -41,8 +40,8 @@ typedef unsigned int(WINAPI *IF_NAMETOINDEX_FN)(const char *);
 /* This is used instead of if_nametoindex if available on Windows */
 extern IF_NAMETOINDEX_FN Curl_if_nametoindex;
 #endif
-#else  /* _WIN32 */
+#else /* !_WIN32 */
 #define Curl_win32_init(x) CURLE_OK
-#endif /* !_WIN32 */
+#endif /* _WIN32 */
 
 #endif /* HEADER_CURL_SYSTEM_WIN32_H */
index b4589158e9df069e76a21792e4fa574f3e148bad..a9326cbffd898f341bf56af29994d520fd33e8a5 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_TELNET
index 0e03933ab9a9549125b3929d484c2a017a65f549..69571bbdde7f3a244b436607bef37680d598a77f 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifndef CURL_DISABLE_TFTP
index b567d14abd5d9128f48917ffeacdf003e2153e92..fed6a1786e7e8789e79d46c339d6842af3ec231c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 78473b1f0d8936e6b4c51118a588c0dfaa2bac64..05a5f891ac09a36893e01bde3e82f9005e51de9a 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #define Curl_headersep(x) ((((x) == ':') || ((x) == ';')))
 
 char *Curl_checkheaders(const struct Curl_easy *data,
index 32aebe7cda7d98604add1a8c437ad821ee8ec15a..5efdbea282ce354ac91c7084268e7231a194fdda 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "uint-bset.h"
@@ -186,7 +185,7 @@ uint32_t Curl_popcount64(uint64_t x)
   x -= (x >> 1) & m1;             /* replace every 2 bits with bits present */
   x = (x & m2) + ((x >> 2) & m2); /* replace every nibble with bits present */
   x = (x + (x >> 4)) & m4;        /* replace every byte with bits present */
-  /* top 8 bits of x + (x<<8) + (x<<16) + (x<<24) + ... which makes the
+  /* top 8 bits of x + (x << 8) + (x << 16) + (x << 24) + ... which makes the
    * top byte the sum of all individual 8 bytes, throw away the rest */
   return (uint32_t)((x * h01) >> 56);
 }
index b3fd9dea196cf9e3f3f26d70597704b89b8143ff..e23d249d0571390fc6cc988a2c5502b586140c93 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "uint-hash.h"
index e7f2ab9cbc4897f33d36c99d1ada8be1021f188c..56d71043555896314d0b7f081b18aadbd6ecd839 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 /* A version with uint32_t as key */
index 03e9efb4247cd3bc39978a5131b94744fea40cdc..58dcbdac227519fa6787f3d3eedc00cbab1aba56 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "uint-bset.h"
index bbfabc9edf1a5b92b710c8394e5ce6fae6f84100..b9c1990130bc15461ce3938209d0f887c9255e05 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "uint-table.h"
index 556d140ee222cd9700a6aa8919d714d6907bce7c..f64a1a481c50a06cb67c8a56028fb65d6a59a2a5 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef HAVE_NETINET_IN_H
index 747ac814bae174c679b158558e3bb13170969589..5a424829c0a37215d41f0fcd56308fe07229fc52 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #include "urldata.h"
index 486cfd4173dc5a3288dd1369931f57a85bc61fb3..aba1693ca7db988e5a007ad1ed3a2886d6d2b8ee 100644 (file)
@@ -23,9 +23,7 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /* This file is for lib internal stuff */
-
 #include "curl_setup.h"
 
 #define PORT_FTP    21
@@ -530,43 +528,45 @@ struct Curl_handler {
 };
 
 #define PROTOPT_NONE 0             /* nothing extra */
-#define PROTOPT_SSL (1<<0)         /* uses SSL */
-#define PROTOPT_DUAL (1<<1)        /* this protocol uses two connections */
-#define PROTOPT_CLOSEACTION (1<<2) /* need action before socket close */
+#define PROTOPT_SSL (1 << 0)       /* uses SSL */
+#define PROTOPT_DUAL (1 << 1)      /* this protocol uses two connections */
+#define PROTOPT_CLOSEACTION (1 << 2) /* need action before socket close */
 /* some protocols will have to call the underlying functions without regard to
    what exact state the socket signals. IE even if the socket says "readable",
    the send function might need to be called while uploading, or vice versa.
 */
-#define PROTOPT_DIRLOCK (1<<3)
-#define PROTOPT_NONETWORK (1<<4)   /* protocol does not use the network! */
-#define PROTOPT_NEEDSPWD (1<<5)    /* needs a password, and if none is set it
+#define PROTOPT_DIRLOCK (1 << 3)
+#define PROTOPT_NONETWORK (1 << 4) /* protocol does not use the network! */
+#define PROTOPT_NEEDSPWD (1 << 5)  /* needs a password, and if none is set it
                                       gets a default */
-#define PROTOPT_NOURLQUERY (1<<6)   /* protocol cannot handle
-                                       URL query strings (?foo=bar) ! */
-#define PROTOPT_CREDSPERREQUEST (1<<7) /* requires login credentials per
-                                          request instead of per connection */
-#define PROTOPT_ALPN (1<<8) /* set ALPN for this */
-/* (1<<9) was PROTOPT_STREAM, now free */
-#define PROTOPT_URLOPTIONS (1<<10) /* allow options part in the userinfo field
-                                      of the URL */
-#define PROTOPT_PROXY_AS_HTTP (1<<11) /* allow this non-HTTP scheme over a
-                                         HTTP proxy as HTTP proxies may know
-                                         this protocol and act as a gateway */
-#define PROTOPT_WILDCARD (1<<12)    /* protocol supports wildcard matching */
-#define PROTOPT_USERPWDCTRL (1<<13) /* Allow "control bytes" (< 32 ASCII) in
-                                       username and password */
-#define PROTOPT_NOTCPPROXY (1<<14)  /* this protocol cannot proxy over TCP */
-#define PROTOPT_SSL_REUSE (1<<15)   /* this protocol may reuse an existing
-                                       SSL connection in the same family
-                                       without having PROTOPT_SSL. */
-#define PROTOPT_CONN_REUSE (1<<16)  /* this protocol can reuse connections */
+#define PROTOPT_NOURLQUERY (1 << 6)  /* protocol cannot handle
+                                        URL query strings (?foo=bar) ! */
+#define PROTOPT_CREDSPERREQUEST (1 << 7) /* requires login credentials per
+                                            request instead of per
+                                            connection */
+#define PROTOPT_ALPN (1 << 8) /* set ALPN for this */
+/* (1 << 9) was PROTOPT_STREAM, now free */
+#define PROTOPT_URLOPTIONS (1 << 10) /* allow options part in the userinfo
+                                        field of the URL */
+#define PROTOPT_PROXY_AS_HTTP (1 << 11) /* allow this non-HTTP scheme over a
+                                           HTTP proxy as HTTP proxies may know
+                                           this protocol and act as
+                                           a gateway */
+#define PROTOPT_WILDCARD (1 << 12)  /* protocol supports wildcard matching */
+#define PROTOPT_USERPWDCTRL (1 << 13) /* Allow "control bytes" (< 32 ASCII) in
+                                         username and password */
+#define PROTOPT_NOTCPPROXY (1 << 14)  /* this protocol cannot proxy over TCP */
+#define PROTOPT_SSL_REUSE (1 << 15)   /* this protocol may reuse an existing
+                                         SSL connection in the same family
+                                         without having PROTOPT_SSL. */
+#define PROTOPT_CONN_REUSE (1 << 16)  /* this protocol can reuse connections */
 
 #define CONNCHECK_NONE 0                 /* No checks */
-#define CONNCHECK_ISDEAD (1<<0)          /* Check if the connection is dead. */
-#define CONNCHECK_KEEPALIVE (1<<1)       /* Perform any keepalive function. */
+#define CONNCHECK_ISDEAD (1 << 0)        /* Check if the connection is dead. */
+#define CONNCHECK_KEEPALIVE (1 << 1)     /* Perform any keepalive function. */
 
 #define CONNRESULT_NONE 0                /* No extra information. */
-#define CONNRESULT_DEAD (1<<0)           /* The connection is dead. */
+#define CONNRESULT_DEAD (1 << 0)         /* The connection is dead. */
 
 #define TRNSPRT_NONE 0
 #define TRNSPRT_TCP  3
index a3e83d74f4757ae9714c649557951921e0041798..fc8a6ebd5102516803695f3bdd91cc94100eed3d 100644 (file)
@@ -24,7 +24,6 @@
  * Draft   LOGIN SASL Mechanism <draft-murchison-sasl-login-00.txt>
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \
index 8aa4055231cdd228aa83acde0e2c4a12e185b6f3..f5399738020b788be6c61ebccc2556705672450b 100644 (file)
@@ -23,7 +23,6 @@
  * RFC2195 CRAM-MD5 authentication
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifndef CURL_DISABLE_DIGEST_AUTH
index c67be1dd848463dfc4ac9d48907597773ddaabec..40e8873913ec0d219df2cae5de74420689c50852 100644 (file)
@@ -24,7 +24,6 @@
  * RFC7616 DIGEST-SHA256, DIGEST-SHA512-256 authentication
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifndef CURL_DISABLE_DIGEST_AUTH
@@ -586,16 +585,16 @@ CURLcode Curl_auth_decode_digest_http_message(const char *chlg,
         else if(curl_strequal(content, "SHA-512-256")) {
 #ifdef CURL_HAVE_SHA512_256
           digest->algo = ALGO_SHA512_256;
-#else  /* ! CURL_HAVE_SHA512_256 */
+#else /* !CURL_HAVE_SHA512_256 */
           return CURLE_NOT_BUILT_IN;
-#endif /* CURL_HAVE_SHA512_256 */
+#endif /* CURL_HAVE_SHA512_256 */
         }
         else if(curl_strequal(content, "SHA-512-256-SESS")) {
 #ifdef CURL_HAVE_SHA512_256
           digest->algo = ALGO_SHA512_256SESS;
-#else  /* ! CURL_HAVE_SHA512_256 */
+#else /* !CURL_HAVE_SHA512_256 */
           return CURLE_NOT_BUILT_IN;
-#endif /* CURL_HAVE_SHA512_256 */
+#endif /* CURL_HAVE_SHA512_256 */
         }
         else
           return CURLE_BAD_CONTENT_ENCODING;
index 63f388bf46b0f038b925f1b8dc5d7d7081e2fea4..902ffab153a8ccfb7c0b73ff6690f5a55db35042 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifndef CURL_DISABLE_DIGEST_AUTH
index bc681d13dc8877e36da8483d6335815d407148e3..615b4bc8274cccdf2850d181ffd7cbe8f7bce3cd 100644 (file)
@@ -24,7 +24,6 @@
  * RFC2831 DIGEST-MD5 authentication
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_DIGEST_AUTH)
index 2f82254608dba6034fbe324e0cfb594f26372303..b95d6e3f0a8e47f7fa5f29bb7b080b242b54ace5 100644 (file)
@@ -23,7 +23,6 @@
  * RFC5802 SCRAM-SHA-1 authentication
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_GSASL
index 64797190ce301c7614271f3fbcd9cf918c1a6a30..6a9f182864c034b0b8c9fd8e40fb87942c45b898 100644 (file)
@@ -24,7 +24,6 @@
  * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(HAVE_GSSAPI) && defined(USE_KERBEROS5)
index d88ee79bdec9d8249dccd0c450af583b00888858..8bf2091a548082245ece1fb64babb5d19456fe7d 100644 (file)
@@ -23,7 +23,6 @@
  * RFC4752 The Kerberos V5 ("GSSAPI") SASL Mechanism
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_WINDOWS_SSPI) && defined(USE_KERBEROS5)
index 620f2a5c845239f93f84a786895f144587a1853f..54755733e9cbb51466b53d2637302ee0d58cb02a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
 /* Flag bits definitions based on
    https://davenport.sourceforge.net/ntlm.html */
 
-#define NTLMFLAG_NEGOTIATE_UNICODE               (1<<0)
+#define NTLMFLAG_NEGOTIATE_UNICODE               (1 << 0)
 /* Indicates that Unicode strings are supported for use in security buffer
    data. */
 
-#define NTLMFLAG_NEGOTIATE_OEM                   (1<<1)
+#define NTLMFLAG_NEGOTIATE_OEM                   (1 << 1)
 /* Indicates that OEM strings are supported for use in security buffer data. */
 
-#define NTLMFLAG_REQUEST_TARGET                  (1<<2)
+#define NTLMFLAG_REQUEST_TARGET                  (1 << 2)
 /* Requests that the server's authentication realm be included in the Type 2
    message. */
 
-/* unknown (1<<3) */
-#define NTLMFLAG_NEGOTIATE_SIGN                  (1<<4)
+/* unknown (1 << 3) */
+#define NTLMFLAG_NEGOTIATE_SIGN                  (1 << 4)
 /* Specifies that authenticated communication between the client and server
    should carry a digital signature (message integrity). */
 
-#define NTLMFLAG_NEGOTIATE_SEAL                  (1<<5)
+#define NTLMFLAG_NEGOTIATE_SEAL                  (1 << 5)
 /* Specifies that authenticated communication between the client and server
    should be encrypted (message confidentiality). */
 
-#define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE        (1<<6)
+#define NTLMFLAG_NEGOTIATE_DATAGRAM_STYLE        (1 << 6)
 /* Indicates that datagram authentication is being used. */
 
-#define NTLMFLAG_NEGOTIATE_LM_KEY                (1<<7)
+#define NTLMFLAG_NEGOTIATE_LM_KEY                (1 << 7)
 /* Indicates that the LAN Manager session key should be used for signing and
    sealing authenticated communications. */
 
-#define NTLMFLAG_NEGOTIATE_NTLM_KEY              (1<<9)
+#define NTLMFLAG_NEGOTIATE_NTLM_KEY              (1 << 9)
 /* Indicates that NTLM authentication is being used. */
 
-/* unknown (1<<10) */
+/* unknown (1 << 10) */
 
-#define NTLMFLAG_NEGOTIATE_ANONYMOUS             (1<<11)
+#define NTLMFLAG_NEGOTIATE_ANONYMOUS             (1 << 11)
 /* Sent by the client in the Type 3 message to indicate that an anonymous
    context has been established. This also affects the response fields. */
 
-#define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED       (1<<12)
+#define NTLMFLAG_NEGOTIATE_DOMAIN_SUPPLIED       (1 << 12)
 /* Sent by the client in the Type 1 message to indicate that a desired
    authentication realm is included in the message. */
 
-#define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED  (1<<13)
+#define NTLMFLAG_NEGOTIATE_WORKSTATION_SUPPLIED  (1 << 13)
 /* Sent by the client in the Type 1 message to indicate that the client
    workstation's name is included in the message. */
 
-#define NTLMFLAG_NEGOTIATE_LOCAL_CALL            (1<<14)
+#define NTLMFLAG_NEGOTIATE_LOCAL_CALL            (1 << 14)
 /* Sent by the server to indicate that the server and client are on the same
    machine. Implies that the client may use a pre-established local security
    context rather than responding to the challenge. */
 
-#define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN           (1<<15)
+#define NTLMFLAG_NEGOTIATE_ALWAYS_SIGN           (1 << 15)
 /* Indicates that authenticated communication between the client and server
    should be signed with a "dummy" signature. */
 
-#define NTLMFLAG_TARGET_TYPE_DOMAIN              (1<<16)
+#define NTLMFLAG_TARGET_TYPE_DOMAIN              (1 << 16)
 /* Sent by the server in the Type 2 message to indicate that the target
    authentication realm is a domain. */
 
-#define NTLMFLAG_TARGET_TYPE_SERVER              (1<<17)
+#define NTLMFLAG_TARGET_TYPE_SERVER              (1 << 17)
 /* Sent by the server in the Type 2 message to indicate that the target
    authentication realm is a server. */
 
-#define NTLMFLAG_TARGET_TYPE_SHARE               (1<<18)
+#define NTLMFLAG_TARGET_TYPE_SHARE               (1 << 18)
 /* Sent by the server in the Type 2 message to indicate that the target
    authentication realm is a share. Presumably, this is for share-level
    authentication. Usage is unclear. */
 
-#define NTLMFLAG_NEGOTIATE_NTLM2_KEY             (1<<19)
+#define NTLMFLAG_NEGOTIATE_NTLM2_KEY             (1 << 19)
 /* Indicates that the NTLM2 signing and sealing scheme should be used for
    protecting authenticated communications. */
 
-#define NTLMFLAG_REQUEST_INIT_RESPONSE           (1<<20)
+#define NTLMFLAG_REQUEST_INIT_RESPONSE           (1 << 20)
 /* unknown purpose */
 
-#define NTLMFLAG_REQUEST_ACCEPT_RESPONSE         (1<<21)
+#define NTLMFLAG_REQUEST_ACCEPT_RESPONSE         (1 << 21)
 /* unknown purpose */
 
-#define NTLMFLAG_REQUEST_NONNT_SESSION_KEY       (1<<22)
+#define NTLMFLAG_REQUEST_NONNT_SESSION_KEY       (1 << 22)
 /* unknown purpose */
 
-#define NTLMFLAG_NEGOTIATE_TARGET_INFO           (1<<23)
+#define NTLMFLAG_NEGOTIATE_TARGET_INFO           (1 << 23)
 /* Sent by the server in the Type 2 message to indicate that it is including a
    Target Information block in the message. */
 
 /* unknown (1<27) */
 /* unknown (1<28) */
 
-#define NTLMFLAG_NEGOTIATE_128                   (1<<29)
+#define NTLMFLAG_NEGOTIATE_128                   (1 << 29)
 /* Indicates that 128-bit encryption is supported. */
 
-#define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE          (1<<30)
+#define NTLMFLAG_NEGOTIATE_KEY_EXCHANGE          (1 << 30)
 /* Indicates that the client will provide an encrypted master key in
    the "Session Key" field of the Type 3 message. */
 
-#define NTLMFLAG_NEGOTIATE_56                    (1<<31)
+#define NTLMFLAG_NEGOTIATE_56                    (1 << 31)
 /* Indicates that 56-bit encryption is supported. */
 
 /* "NTLMSSP" signature is always in ASCII regardless of the platform */
index 3d6712766ebbf5890f5822addf7349595c82b9f1..3197dd0a2e18257b78901b37bce45fade8cac797 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_WINDOWS_SSPI) && defined(USE_NTLM)
index fc89cba49f44dbe2b61fcd91788696aa78d61f32..a7a061337fa9abd1783da7863346523b2a446e89 100644 (file)
@@ -23,7 +23,6 @@
  * RFC6749 OAuth 2.0 Authorization Framework
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_SMTP) || \
index 08689fe5e0aeed766fd6138924d39c3c7f60bc46..b1ec37cb31686f30197fa9f647b4bd6dc9d54688 100644 (file)
@@ -23,7 +23,6 @@
  * RFC4178 Simple and Protected GSS-API Negotiation Mechanism
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(HAVE_GSSAPI) && defined(USE_SPNEGO)
index 280753e3967790f0ae2fddc9e4bdf8b3467cebdc..421176316622d54b9b32f2861d78e696a22271a2 100644 (file)
@@ -23,7 +23,6 @@
  * RFC4178 Simple and Protected GSS-API Negotiation Mechanism
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_WINDOWS_SSPI) && defined(USE_SPNEGO)
index 61f79037a3bbbed7729e44a8685dc014e703cbc0..9c37df947cde5586342c5a1d9b8dd6e1586ebe3d 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #include "vauth.h"
index 39dc0d3995fbf4549d33992c44f2ebdddf89cbdd..312bd8da5ad474c66012fc26fe9d36bcea8ec894 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #include "../bufref.h"
index a5be6c69cf73e82f2a94e751e0fd2b559e3a5e3d..697d9ea96d8faa46aa5b5d4f8f944c780bfd1832 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "curl_setup.h"
 
 #ifdef USE_NGHTTP2
index 7a0c214422bf0e69e6adae597b3ba896d57e37aa..e80ece0f9c7aa23f02c5127038172f6c710b11ff 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_NGTCP2) && defined(USE_NGHTTP3)
index 7933e924e1c70a3640cf4ee595c6eecae51bdc38..1e9868e0f7f6d1b2f68b40856824000187affb61 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_NGTCP2) && defined(USE_NGHTTP3)
index 537484faf66a3c8e10c8a95d0e2d3955c1e7d6f0..464879788c547f03b49ea825d956590bc4de20e4 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_OPENSSL_QUIC) && \
index 9f5025f8aeb3285e31ccfa9c276045f4228902ae..7aa93d6728525aec4bd0677fc90ec20e28c80099 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_OPENSSL_QUIC) && \
index c85336cd02d7cc3cb9284ce202576f23eae54469..5c431110a5f08513476c24cfdb3a1044f0f9712c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_QUICHE)
index bee966eeb7a43e856ed40a271f3d0471e4c6c261..6c0fb9ee1ee695f4780d34a45c050575ff8501ce 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_QUICHE)
index 204a72224996545b435e2c55956f734d69d6dd0f..3391d98074088f646498adafd8d3ee74b6fcb76c 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_HTTP3) && \
index a14714532d03531fd95c5a9789a7c367ad93edfd..cff765432381aa03a96375ba508cec5e3ac02b33 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_HTTP3) && \
index a09b2b719318b603d8c2d55eeab4b9041da5cd73..d7bfa9910408ec5eda974084786bb3903c07982d 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef HAVE_NETINET_UDP_H
index fa2c0d4e816ed4150923c5e9ba5d01b4988b8088..f5392eb04797f7f2d55d4120d6cc4d3c095f0d1e 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if !defined(CURL_DISABLE_HTTP) && defined(USE_HTTP3)
index 82f22b45a88f323e82e4bce9cdada214e53b10d5..e602b7ee6d1782cd79c79eec5a28f95bef821076 100644 (file)
@@ -23,8 +23,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
+
 #include "../bufq.h"
 
 #ifdef USE_HTTP3
index 1a007cd56139ef5375680755eeb06f2f886d81b9..5d5125b5269035c472fb2e5db34e3ccabea845e7 100644 (file)
@@ -24,7 +24,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_LIBSSH
index 6357f41b79d58d79146dd2fb751b1f9618fbdf73..5b2b337289749987c42af032fd9f6b3c26b23cc7 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
-/* #define CURL_LIBSSH2_DEBUG */
-
 #include "../curl_setup.h"
 
 #ifdef USE_LIBSSH2
 
+/* #define CURL_LIBSSH2_DEBUG */
+
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
@@ -167,7 +166,7 @@ static void kbd_callback(const char *name, int name_len,
   (void)name_len;
   (void)instruction;
   (void)instruction_len;
-#endif  /* CURL_LIBSSH2_DEBUG */
+#endif /* CURL_LIBSSH2_DEBUG */
   if(num_prompts == 1) {
     struct connectdata *conn = data->conn;
     responses[0].text = curlx_strdup(conn->passwd);
index 40b26e6cb7b3a087d76eeb3abd02ac546305e133..6fdf3f794bc1543ddc6ee7334c2ddf850d6c64df 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_LIBSSH2
index d322643eb408a65635b2f32e9028fb4932e6d7f0..77fa89b557e670cf7ffe2036738296cf84d64e0b 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl AND ISC
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_SSH
@@ -239,4 +238,4 @@ CURLcode Curl_ssh_range(struct Curl_easy *data,
   return CURLE_OK;
 }
 
-#endif /* if SSH is used */
+#endif /* USE_SSH */
index 78de75c9e9254fe8d5e5f416daaab19c5be93e3f..4bc6d808074a75b73ab90634127637168e35d0b8 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #include "../urldata.h"
@@ -37,4 +36,5 @@ CURLcode Curl_get_pathname(const char **cpp, char **path, const char *homedir);
 CURLcode Curl_ssh_range(struct Curl_easy *data,
                         const char *range, curl_off_t filesize,
                         curl_off_t *startp, curl_off_t *sizep);
+
 #endif /* HEADER_CURL_PATH_H */
index 3d84f87822883ff3b75fc813bd32a06eeb01a7af..dd1b5db357658b0dae9cc6956dd3c1b5af62a760 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_APPLE_SECTRUST
index c026bdee91345c0d50491cde21a690fec5fb74a3..562a3477355d7764c16550460966d9563df18b8f 100644 (file)
@@ -24,6 +24,7 @@
 #include "../curl_setup.h"
 
 #if defined(USE_MBEDTLS) || defined(USE_RUSTLS)
+
 #include "cipher_suite.h"
 
 /*
@@ -130,24 +131,24 @@ enum {
   CS_TXT_LEN,
 };
 
-#define CS_ZIP_IDX(a, b, c, d, e, f, g, h)             \
-{                                                      \
-  (uint8_t) ((((a) << 2) & 0xFF) | ((b) & 0x3F) >> 4), \
-  (uint8_t) ((((b) << 4) & 0xFF) | ((c) & 0x3F) >> 2), \
-  (uint8_t) ((((c) << 6) & 0xFF) | ((d) & 0x3F)),      \
-  (uint8_t) ((((e) << 2) & 0xFF) | ((f) & 0x3F) >> 4), \
-  (uint8_t) ((((f) << 4) & 0xFF) | ((g) & 0x3F) >> 2), \
-  (uint8_t) ((((g) << 6) & 0xFF) | ((h) & 0x3F))       \
+#define CS_ZIP_IDX(a, b, c, d, e, f, g, h)            \
+{                                                     \
+  (uint8_t)((((a) << 2) & 0xFF) | ((b) & 0x3F) >> 4), \
+  (uint8_t)((((b) << 4) & 0xFF) | ((c) & 0x3F) >> 2), \
+  (uint8_t)((((c) << 6) & 0xFF) | ((d) & 0x3F)),      \
+  (uint8_t)((((e) << 2) & 0xFF) | ((f) & 0x3F) >> 4), \
+  (uint8_t)((((f) << 4) & 0xFF) | ((g) & 0x3F) >> 2), \
+  (uint8_t)((((g) << 6) & 0xFF) | ((h) & 0x3F))       \
 }
-#define CS_ENTRY(id, a, b, c, d, e, f, g, h)           \
-{                                                      \
-  id,                                                  \
-  CS_ZIP_IDX(                                          \
-    CS_TXT_IDX_ ## a, CS_TXT_IDX_ ## b,                \
-    CS_TXT_IDX_ ## c, CS_TXT_IDX_ ## d,                \
-    CS_TXT_IDX_ ## e, CS_TXT_IDX_ ## f,                \
-    CS_TXT_IDX_ ## g, CS_TXT_IDX_ ## h                 \
-  )                                                    \
+#define CS_ENTRY(id, a, b, c, d, e, f, g, h) \
+{                                            \
+  id,                                        \
+  CS_ZIP_IDX(                                \
+    CS_TXT_IDX_ ## a, CS_TXT_IDX_ ## b,      \
+    CS_TXT_IDX_ ## c, CS_TXT_IDX_ ## d,      \
+    CS_TXT_IDX_ ## e, CS_TXT_IDX_ ## f,      \
+    CS_TXT_IDX_ ## g, CS_TXT_IDX_ ## h       \
+  )                                          \
 }
 
 struct cs_entry {
index a1dcbc524fec2127264354d8738c326ff358f9da..a17284f86eabc617a099699a923309bc70d36b34 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_MBEDTLS) || defined(USE_RUSTLS)
index dbc72c521d4a1dc506c31382f5a4078f413d693a..0fa7cfd6e1279ba27d4ca65e9b4bc9edd570f9f1 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Source file for all GnuTLS-specific code for the TLS/SSL layer. No code
  * but vtls.c should ever call or use these functions.
@@ -29,7 +28,6 @@
  * Note: do not use the GnuTLS' *_t variable type names in this source code,
  * since they were not present in 1.0.X.
  */
-
 #include "../curl_setup.h"
 
 #ifdef USE_GNUTLS
index 4ed79f63ed3909b149a644b3293151e6ed2fba79..ecdca0a666a5fd27e2ff82e61f0fec3fdfb72ceb 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_GNUTLS
index e56860a35ba92c8d2130a2d3e6871d749e0e6b01..9706336735c210b8d453efe1ff2f837a2285eaa6 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_OPENSSL) || defined(USE_SCHANNEL)
@@ -125,4 +124,4 @@ bool Curl_cert_hostcheck(const char *match, size_t matchlen,
   return FALSE;
 }
 
-#endif /* OPENSSL or SCHANNEL */
+#endif /* USE_OPENSSL || USE_SCHANNEL */
index ca767be3ce1d9e4895161cec28731ce9161ddb04..d62c721352af1874753e9671e2dc424a9bc99f8f 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_OPENSSL) || defined(USE_SCHANNEL)
index 2c1c595bfc987445d1e1c98144c5684dd84e862f..ace9cab1ae2b7ffa706695986c9239bbb555f971 100644 (file)
@@ -144,4 +144,4 @@ bool Curl_tls_keylog_write(const char *label,
   return TRUE;
 }
 
-#endif  /* TLS or QUIC backend */
+#endif /* TLS or QUIC backend */
index 46bfa0967e555ef368fe221dfc459272f71ba40e..dff45a3299482467e1e05b5d2c96201c620574f3 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Source file for all mbedTLS-specific code for the TLS/SSL layer. No code
  * but vtls.c should ever call or use these functions.
  *
  */
-
 #include "../curl_setup.h"
 
 #ifdef USE_MBEDTLS
index dcc76a9299aaeb505e605c911cc16afc30c72ae0..339130103fe7ea6d235bf0c4eaee09137d3ecd6b 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Source file for all OpenSSL-specific code for the TLS/SSL layer. No code
  * but vtls.c should ever call or use these functions.
  */
-
 #include "../curl_setup.h"
 
 #if defined(USE_QUICHE) || defined(USE_OPENSSL)
@@ -518,7 +516,7 @@ static CURLcode ossl_certchain(struct Curl_easy *data, SSL *ssl)
   return result;
 }
 
-#endif /* quiche or OpenSSL */
+#endif /* USE_QUICHE || USE_OPENSSL */
 
 #ifdef USE_OPENSSL
 
@@ -4656,7 +4654,7 @@ out:
   curlx_dyn_free(&dname);
   return result;
 }
-#endif /* ! CURL_DISABLE_VERBOSE_STRINGS */
+#endif /* !CURL_DISABLE_VERBOSE_STRINGS */
 
 #ifdef USE_APPLE_SECTRUST
 struct ossl_certs_ctx {
index c3ba67a8ff4100f411f7c46b98e22efaa355429c..aeeb8dd805b0fd0e5ad8c0adf27cf127f88fe044 100644 (file)
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_OPENSSL
index 014f11b4f0ec432fb10042048dc441c9a711b7c6..fc380b062b5584d3d272fe90930bb9ef12591feb 100644 (file)
@@ -5,8 +5,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) Jacob Hoffman-Andrews,
- * <github@hoffman-andrews.com>
+ * Copyright (C) Jacob Hoffman-Andrews, <github@hoffman-andrews.com>
  * Copyright (C) kpcyrd, <kpcyrd@archlinux.org>
  * Copyright (C) Daniel McCarney, <daniel@binaryparadox.net>
  *
index 74d39d4d1155191a7e9ca3f0a11e85851245ee09..2d3b0bb11f1daff419f2b8a37ce0673717b0ec1a 100644 (file)
@@ -1,3 +1,5 @@
+#ifndef HEADER_CURL_RUSTLS_H
+#define HEADER_CURL_RUSTLS_H
 /***************************************************************************
  *                                  _   _ ____  _
  *  Project                     ___| | | |  _ \| |
@@ -5,8 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) Jacob Hoffman-Andrews,
- * <github@hoffman-andrews.com>
+ * Copyright (C) Jacob Hoffman-Andrews, <github@hoffman-andrews.com>
  *
  * This software is licensed as described in the file COPYING, which
  * you should have received as part of this distribution. The terms
@@ -22,9 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-#ifndef HEADER_CURL_RUSTLS_H
-#define HEADER_CURL_RUSTLS_H
-
 #include "../curl_setup.h"
 
 #ifdef USE_RUSTLS
index 2575a9f8f97aa24519a87136a4185eaf45f49c64..891dfc4e73c45309a54de726eb6f82b025c42cb3 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Source file for all Schannel-specific code for the TLS/SSL layer. No code
  * but vtls.c should ever call or use these functions.
  */
-
 #include "../curl_setup.h"
 
 #ifdef USE_SCHANNEL
index e3525a110516b55429076a4e22264360cad6c9b4..5129b8b04d33871489166eee0bf87b6186fb097f 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Source file for Schannel-specific certificate verification. This code should
  * only be invoked by code in schannel.c.
  */
-
 #include "../curl_setup.h"
 
 #ifdef USE_SCHANNEL
index b5b517f0b6fa34e9c63f8186d472e31bad54e543..112681ae57908699a101653661bc8361541c069f 100644 (file)
@@ -32,24 +32,22 @@ struct Curl_cfilter;
 struct Curl_easy;
 struct dynbuf;
 
-#define SSLSUPP_CA_PATH      (1<<0) /* supports CAPATH */
-#define SSLSUPP_CERTINFO     (1<<1) /* supports CURLOPT_CERTINFO */
-#define SSLSUPP_PINNEDPUBKEY (1<<2) /* supports CURLOPT_PINNEDPUBLICKEY */
-#define SSLSUPP_SSL_CTX      (1<<3) /* supports CURLOPT_SSL_CTX */
-#define SSLSUPP_HTTPS_PROXY  (1<<4) /* supports access via HTTPS proxies */
-#define SSLSUPP_TLS13_CIPHERSUITES (1<<5) /* supports TLS 1.3 ciphersuites */
-#define SSLSUPP_CAINFO_BLOB  (1<<6)
-#define SSLSUPP_ECH          (1<<7)
-#define SSLSUPP_CA_CACHE     (1<<8)
-#define SSLSUPP_CIPHER_LIST  (1<<9) /* supports TLS 1.0-1.2 ciphersuites */
-#define SSLSUPP_SIGNATURE_ALGORITHMS (1<<10) /* supports TLS sigalgs */
+#define SSLSUPP_CA_PATH      (1 << 0) /* supports CAPATH */
+#define SSLSUPP_CERTINFO     (1 << 1) /* supports CURLOPT_CERTINFO */
+#define SSLSUPP_PINNEDPUBKEY (1 << 2) /* supports CURLOPT_PINNEDPUBLICKEY */
+#define SSLSUPP_SSL_CTX      (1 << 3) /* supports CURLOPT_SSL_CTX */
+#define SSLSUPP_HTTPS_PROXY  (1 << 4) /* supports access via HTTPS proxies */
+#define SSLSUPP_TLS13_CIPHERSUITES (1 << 5) /* supports TLS 1.3 ciphersuites */
+#define SSLSUPP_CAINFO_BLOB  (1 << 6)
+#define SSLSUPP_ECH          (1 << 7)
+#define SSLSUPP_CA_CACHE     (1 << 8)
+#define SSLSUPP_CIPHER_LIST  (1 << 9) /* supports TLS 1.0-1.2 ciphersuites */
+#define SSLSUPP_SIGNATURE_ALGORITHMS (1 << 10) /* supports TLS sigalgs */
 
 #ifdef USE_ECH
 # include "../curlx/base64.h"
 # define ECH_ENABLED(__data__) \
-    (__data__->set.tls_ech && \
-     !(__data__->set.tls_ech & CURLECH_DISABLE)\
-    )
+  (__data__->set.tls_ech && !(__data__->set.tls_ech & CURLECH_DISABLE))
 #endif /* USE_ECH */
 
 #define ALPN_ACCEPTED "ALPN: server accepted "
@@ -96,7 +94,7 @@ CURLsslset Curl_init_sslset_nolock(curl_sslbackend id, const char *name,
                                    const curl_ssl_backend ***avail);
 
 #ifndef MAX_PINNED_PUBKEY_SIZE
-#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1MB */
+#define MAX_PINNED_PUBKEY_SIZE 1048576 /* 1 MiB */
 #endif
 
 curl_sslbackend Curl_ssl_backend(void);
index ea4ea4e68efa73c1f794f8a0b3f546c2e97baae6..df04ec7e00f0dbee591a42ecb5646204476416c6 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #ifdef USE_SSL
index 67049462a8597d401956506df24b0335835e83ef..2a99e779e5285dee6adcbb396988d374c00489ae 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "../curl_setup.h"
+
 #include "../cfilters.h"
 #include "../urldata.h"
 
index ac289f1b2f69e48661352626197aaad40f3fc42f..9eeb808bde36d314f8280b472f08d405675dc072 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_SSL) && defined(USE_SSLS_EXPORT)
index 3ccd0917a4fe19047136f238090128c54663db43..510378886d26f072eb5684db60b8d03e238e831a 100644 (file)
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * Source file for all wolfSSL specific code for the TLS/SSL layer. No code
  * but vtls.c should ever call or use these functions.
  *
  */
-
 #include "../curl_setup.h"
 
 #ifdef USE_WOLFSSL
@@ -1712,7 +1710,7 @@ static CURLcode wssl_handshake(struct Curl_cfilter *cf, struct Curl_easy *data)
       wolfSSL_FreeArrays(wssl->ssl);
     }
   }
-#endif  /* OPENSSL_EXTRA */
+#endif /* OPENSSL_EXTRA */
 
   detail = wolfSSL_get_error(wssl->ssl, ret);
   CURL_TRC_CF(data, cf, "wolfSSL_connect() -> %d, detail=%d", ret, detail);
index e23331e9d676f39c40682d3431baedcd92b16052..e6fdb10d65f94699d030ffad28d4d231410d073f 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \
@@ -1260,5 +1259,5 @@ done:
 
 #endif /* WANT_EXTRACT_CERTINFO */
 
-#endif /* USE_GNUTLS or USE_WOLFSSL or USE_SCHANNEL or USE_MBEDTLS or
+#endif /* USE_GNUTLS || USE_WOLFSSL || USE_SCHANNEL || USE_MBEDTLS ||
           USE_RUSTLS */
index 51ea0c2cd6686d3da777588fcc1bacda5f0feeef..ba2c3893a9b947f518f00b2f64ae1303d0c61e64 100644 (file)
@@ -24,7 +24,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "../curl_setup.h"
 
 #if defined(USE_GNUTLS) || defined(USE_WOLFSSL) || defined(USE_SCHANNEL) || \
@@ -87,9 +86,9 @@ CURLcode Curl_x509_GTime2str(struct dynbuf *store,
 /* used by unit1657.c */
 CURLcode Curl_x509_getASN1Element(struct Curl_asn1Element *elem,
                                   const char *beg, const char *end);
-#endif
-#endif
+#endif /* USE_GNUTLS || USE_SCHANNEL || USE_MBEDTLS || RUSTLS */
+#endif /* UNITTESTS */
 
-#endif /* USE_GNUTLS or USE_WOLFSSL or USE_SCHANNEL or USE_MBEDTLS or
+#endif /* USE_GNUTLS || USE_WOLFSSL || USE_SCHANNEL || USE_MBEDTLS ||
           USE_RUSTLS */
 #endif /* HEADER_CURL_X509ASN1_H */
index a537e3843200ec7ca5e6b57500ba4bf03fee4391..88a50acc261dcad723c96e842aeacecf10ef06e8 100755 (executable)
@@ -1088,6 +1088,7 @@ sub listhelp {
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_help.h"
 
 /*
index 8716b72437c74ce2578879061f575eb9596e4271..9e6030d5536d8065128515a6fbed8c714f5641d3 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 /*
  * The purpose of this tool is to figure out which, if any, features that are
  * disabled which should otherwise exist and work. These are not visible in
  * Disabled protocols are visible in curl_version_info() and are not included
  * in this table.
  */
-
 #include "curl_setup.h"
+
 #include "multihandle.h" /* for ENABLE_WAKEUP */
 #include "tool_xattr.h" /* for USE_XATTR */
 #include "curl_sha512_256.h" /* for CURL_HAVE_SHA512_256 */
 #include "asyn.h" /* for CURLRES_ARES */
 #include "fake_addrinfo.h" /* for USE_FAKE_GETADDRINFO */
+
 #include <stdio.h>
 
 static const char *disabled[] = {
index 8a3ff254ccbc529e11edbc3495e216d9a7677aea..f34cbd48616eb3765e05786f42991abc65b0950a 100644 (file)
@@ -21,7 +21,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "tool_setup.h"
 
 #ifndef CURL_DISABLE_LIBCURL_OPTION
index dd7b8c10a7d70b30a8cb2a9886195532c8c20091..7bf76257a49c9bfe351708f3325b9dc81292c81b 100644 (file)
@@ -23,8 +23,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "tool_setup.h"
+
 #ifndef CURL_DISABLE_LIBCURL_OPTION
 
 /* linked-list structure with last node cache for easysrc */
index 6b442dd1c94d264f8ba028f776c041ff0feb53bd..89243ef2543b9edeb03ed1b0d8aa15a823055377 100644 (file)
@@ -23,8 +23,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "tool_setup.h"
+
 #include "tool_sdecls.h"
 #include "tool_urlglob.h"
 #include "var.h"
index 44d40b727a41858bbc5e5021ccf55a4a5a2b8c86..f9ddacfc3779d941303f0c6e8b4fe277ae4858ae 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #ifndef CURL_DISABLE_LIBCURL_OPTION
 
 /* global variable declarations, for easy-interface source code generation */
index 31d8019fa2b839a5daebe29ed49d1a8e3a492a23..caa959b6076d668af599e30e5fc9d34803f8b9c8 100644 (file)
@@ -27,9 +27,8 @@
 
 #ifndef CURL_DISABLE_IPFS
 #define MAX_GATEWAY_URL_LEN 10000
-
 CURLcode ipfs_url_rewrite(CURLU *uh, const char *protocol, char **url,
                           struct OperationConfig *config);
+#endif
 
 #endif /* HEADER_CURL_TOOL_IPFS_H */
-#endif /* !CURL_DISABLE_IPFS */
index 48a32214b8018f8fc9c6122f14a91b127dbecbd9..9a8a7d94a79043ddd52792f73ae2fc97848ee860 100644 (file)
@@ -22,6 +22,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_help.h"
 
 /*
index be75d95593efd66008471809a0e58a80600d3325..eb201929f6cc7d835b4b952dbe9917dce9543591 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_cfgable.h"
 
 void warnf(const char *fmt, ...) CURL_PRINTF(1, 2);
index 19cb8b5248c20c3b10aab112f15a4d4c3bafaf15..8c30d3b651e3dab47254a5146eb7a35eaaaee76d 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_cb_hdr.h"
 #include "tool_cb_prg.h"
 #include "tool_sdecls.h"
index c46f3e3eefd9b4650e914095a6d42b2a3e041086..4ad8f84c21890405b1dd82ad8b21ed2e1390306b 100644 (file)
@@ -22,8 +22,8 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
-#include "tool_operate.h"
 
+#include "tool_operate.h"
 #include "tool_cfgable.h"
 #include "tool_doswin.h"
 #include "tool_operhlp.h"
index f7ffe558f244979683318f95abad753b9f849109..d2d932b0008750409de411d337f438124aac4cd3 100644 (file)
@@ -22,6 +22,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_operate.h"
 #include "tool_progress.h"
 
index 1699e5f34f565192cc0659cf4b81370e6cc3dbad..a0d9d2baf5c55e478cec31bb5e087a26cce795c3 100644 (file)
@@ -103,7 +103,7 @@ int tool_ftruncate64(int fd, curl_off_t where);
 #define HAVE_FTRUNCATE 1
 #define USE_TOOL_FTRUNCATE 1
 
-#endif /* ! HAVE_FTRUNCATE */
+#endif /* !HAVE_FTRUNCATE */
 #endif /* _WIN32 */
 
 #endif /* HEADER_CURL_TOOL_SETUP_H */
index 7871ebc0ccb52a2c4ce8bf86ff3c88419fdf8631..8ac6726dab356e01aa302f6eafadeadcb9ac2641 100644 (file)
@@ -21,8 +21,8 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "tool_setup.h"
+
 #include "tool_stderr.h"
 #include "tool_msgs.h"
 
index 94c508579209bcd9badf76a5f8ee69d074f89d4d..47fc7ca1cad5cdd09b6a779adaa68d4405478767 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_cfgable.h"
 
 void tool_init_stderr(void);
index 70b3cd148b56bf933b395943828e91b3222c63f3..4025eaeef6d7c730e3cea75182fa93353f0a374e 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_operate.h"
 
 typedef enum {
index 48c330dfaa83ff7f014fec9e4c29b77aa1914e40..7318367c172ff6d7c7c346751e1a8e88db99c6b5 100644 (file)
@@ -24,6 +24,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_writeout.h"
 
 int jsonquoted(const char *in, size_t len, struct dynbuf *out, bool lowercase);
index b111c7b843e48dea0bc43ddaff9ff14684d60153..cdf8296307a514ddc2b02fa330fa20e9959f3890 100644 (file)
@@ -22,6 +22,7 @@
  *
  ***************************************************************************/
 #include "tool_setup.h"
+
 #include "tool_xattr.h"
 
 #ifdef USE_XATTR
index 40defea8ace1403b15a7c8334ec6f890c047da91..bb191ce09ec97a2c0c0abd2f534907a4427042ea 100644 (file)
--- a/src/var.h
+++ b/src/var.h
@@ -23,7 +23,6 @@
  * SPDX-License-Identifier: curl
  *
  ***************************************************************************/
-
 #include "tool_getparam.h"
 
 struct tool_var {
index 74c7ec4fa9f285f6cb90ca3adecea5d301c3c194..e33f87c993b3d99eff48e48515a86cda0bc7cb09 100755 (executable)
@@ -2652,7 +2652,7 @@ sub PORT_ftp {
             sendcontrol "500 silly you, go away\r\n";
             return;
         }
-        $port = ($5<<8)+$6;
+        $port = ($5 << 8) + $6;
         $addr = "$1.$2.$3.$4";
     }
     # EPRT |2|::1|49706|
index c794559428198a130fb34d2a8e889f28d54483f7..aaddbf04ed95b20bc53a1a82f10b08c33624fb9a 100644 (file)
@@ -26,7 +26,7 @@
 static size_t print_httppost_callback(void *arg, const char *buf, size_t len)
 {
   fwrite(buf, len, 1, stdout);
-  (*(size_t *)arg) += len;
+  *((size_t *)arg) += len;
   return len;
 }
 
index ba88719b0ae28aaed238c7dbac2fa174919d3eda..80d06080de0f1eb0b0cb93a164dda16c53d752ab 100644 (file)
@@ -33,7 +33,6 @@ static size_t t1901_read_cb(char *ptr, size_t size, size_t nmemb, void *stream)
     NULL
   };
   static int ix = 0;
-  (void)nmemb;
   (void)stream;
   if(chunks[ix]) {
     size_t len = strlen(chunks[ix]);
index 3dcd7e34174b67a2275b6d70424339437329022f..e66dbdc1c17abe159c4b5cf577cfcc77f124ea60 100644 (file)
@@ -36,4 +36,4 @@ char *tutil_suburl(const char *base, int i);
 void tutil_rlim2str(char *buf, size_t len, rlim_t val);
 #endif
 
-#endif  /* HEADER_CURL_LIBTEST_TESTUTIL_H */
+#endif /* HEADER_CURL_LIBTEST_TESTUTIL_H */
index db97c48aed2ec36c0a3c49d02f1ef55a668ccd67..d879ea5b79ccd78308c1c278bbd131e678b4159b 100644 (file)
@@ -541,7 +541,7 @@ static CURLcode test_unit1658(const char *arg)
   UNITTEST_END(curl_global_cleanup())
 }
 
-#else /* CURL_DISABLE_DOH or not HTTPSRR enabled */
+#else /* CURL_DISABLE_DOH || !USE_HTTPSRR */
 
 static CURLcode test_unit1658(const char *arg)
 {