diff --git a/docs/examples/cookie_interface.c b/docs/examples/cookie_interface.c
index aa3ea1d013..698044deaf 100644
--- a/docs/examples/cookie_interface.c
+++ b/docs/examples/cookie_interface.c
@@ -117,8 +117,7 @@ int main(void)
/* HTTP-header style cookie. If you use the Set-Cookie format and do not
specify a domain then the cookie is sent for any domain and is not
modified, likely not what you intended. For more information refer to
- the CURLOPT_COOKIELIST documentation.
- */
+ the CURLOPT_COOKIELIST documentation. */
snprintf(nline, sizeof(nline),
"Set-Cookie: OLD_PREF=3d141414bf4209321; "
"expires=Sun, 17-Jan-2038 19:14:07 GMT; path=/; domain=.example.com");
diff --git a/docs/examples/htmltitle.cpp b/docs/examples/htmltitle.cpp
index cce6d16e11..c1130ce522 100644
--- a/docs/examples/htmltitle.cpp
+++ b/docs/examples/htmltitle.cpp
@@ -24,14 +24,14 @@
/*
* Get a webpage, extract the title with libxml.
*
-
- Written by Lars Nilsson
-
- GNU C++ compile command line suggestion (edit paths accordingly):
-
- g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
- -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
-*/
+ *
+ * Written by Lars Nilsson
+ *
+ * GNU C++ compile command line suggestion (edit paths accordingly):
+ *
+ * g++ -Wall -I/opt/curl/include -I/opt/libxml/include/libxml2 htmltitle.cpp \
+ * -o htmltitle -L/opt/curl/lib -L/opt/libxml/lib -lcurl -lxml2
+ */
#include
#include
#include
diff --git a/docs/examples/post-callback.c b/docs/examples/post-callback.c
index 729642cbce..e5b70366d1 100644
--- a/docs/examples/post-callback.c
+++ b/docs/examples/post-callback.c
@@ -102,13 +102,11 @@ int main(void)
/* get verbose debug output please */
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1L);
- /*
- If you use POST to an HTTP 1.1 server, you can send data without knowing
- the size before starting the POST if you use chunked encoding. You
- enable this by adding a header like "Transfer-Encoding: chunked" with
- CURLOPT_HTTPHEADER. With HTTP 1.0 or without chunked transfer, you must
- specify the size in the request.
- */
+ /* If you use POST to an HTTP 1.1 server, you can send data without knowing
+ the size before starting the POST if you use chunked encoding. You
+ enable this by adding a header like "Transfer-Encoding: chunked" with
+ CURLOPT_HTTPHEADER. With HTTP 1.0 or without chunked transfer, you must
+ specify the size in the request. */
#ifdef USE_CHUNKED
{
struct curl_slist *chunk = NULL;
diff --git a/docs/examples/sendrecv.c b/docs/examples/sendrecv.c
index a8d0697028..2777ca0a6d 100644
--- a/docs/examples/sendrecv.c
+++ b/docs/examples/sendrecv.c
@@ -89,8 +89,7 @@ int main(void)
supports "natively", you are doing it wrong and you should stop.
This example uses HTTP only to show how to use this API, it does not
- suggest that writing an application doing this is sensible.
- */
+ suggest that writing an application doing this is sensible. */
curl = curl_easy_init();
if(curl) {
diff --git a/docs/examples/simplessl.c b/docs/examples/simplessl.c
index 43fe34cf3f..24e08c4c71 100644
--- a/docs/examples/simplessl.c
+++ b/docs/examples/simplessl.c
@@ -46,7 +46,7 @@
4. if you do not use a crypto engine:
4.1. set pKeyName to the filename of your client key
4.2. if the format of the key file is DER, set pKeyType to "DER"
-*/
+ */
int main(void)
{
diff --git a/docs/examples/threaded.c b/docs/examples/threaded.c
index 54b315bc57..b858c1a3f8 100644
--- a/docs/examples/threaded.c
+++ b/docs/examples/threaded.c
@@ -73,11 +73,9 @@ static void *pull_one_url(void *p)
return NULL;
}
-/*
- int pthread_create(pthread_t *new_thread_ID,
+/* int pthread_create(pthread_t *new_thread_ID,
const pthread_attr_t *attr,
- void * (*start_func)(void *), void *arg);
-*/
+ void * (*start_func)(void *), void *arg); */
int main(void)
{
diff --git a/docs/libcurl/opts/CURLOPT_COOKIELIST.md b/docs/libcurl/opts/CURLOPT_COOKIELIST.md
index ae7d650db3..9b9456ec12 100644
--- a/docs/libcurl/opts/CURLOPT_COOKIELIST.md
+++ b/docs/libcurl/opts/CURLOPT_COOKIELIST.md
@@ -100,17 +100,15 @@ int main(void)
before a transfer is performed. Cookies in the list that have the same
hostname, path and name as in my_cookie are skipped. That is because
libcurl has already imported my_cookie and it is considered a "live"
- cookie. A live cookie is not replaced by one read from a file.
- */
+ cookie. A live cookie is not replaced by one read from a file. */
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, "cookies.txt"); /* import */
/* Cookies are exported after curl_easy_cleanup is called. The server
may have added, deleted or modified cookies by then. The cookies that
- were skipped on import are not exported.
- */
+ were skipped on import are not exported. */
curl_easy_setopt(curl, CURLOPT_COOKIEJAR, "cookies.txt"); /* export */
- result = curl_easy_perform(curl); /* cookies imported from cookies.txt */
+ result = curl_easy_perform(curl); /* cookies imported from cookies.txt */
curl_easy_cleanup(curl); /* cookies exported to cookies.txt */
}
diff --git a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md
index 6ba194aabb..fa3a7c7994 100644
--- a/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md
+++ b/docs/libcurl/opts/CURLOPT_ERRORBUFFER.md
@@ -82,9 +82,8 @@ int main(void)
result = curl_easy_perform(curl);
/* if the request did not complete correctly, show the error
- information. if no detailed error information was written to errbuf
- show the more generic information from curl_easy_strerror instead.
- */
+ information. if no detailed error information was written to errbuf
+ show the more generic information from curl_easy_strerror instead. */
if(result != CURLE_OK) {
size_t len = strlen(errbuf);
fprintf(stderr, "\nlibcurl: (%d) ", result);
diff --git a/include/curl/curl.h b/include/curl/curl.h
index adc0c90e72..326804eb18 100644
--- a/include/curl/curl.h
+++ b/include/curl/curl.h
@@ -632,7 +632,7 @@ typedef enum {
match */
CURLE_SSL_INVALIDCERTSTATUS, /* 91 - invalid certificate status */
CURLE_HTTP2_STREAM, /* 92 - stream error in HTTP/2 framing layer
- */
+ */
CURLE_RECURSIVE_API_CALL, /* 93 - an api function was called from
inside a callback */
CURLE_AUTH_ERROR, /* 94 - an authentication function returned an
@@ -1537,8 +1537,7 @@ typedef enum {
/* FTP Option that causes missing dirs to be created on the remote server.
In 7.19.4 we introduced the convenience enums for this option using the
- CURLFTP_CREATE_DIR prefix.
- */
+ CURLFTP_CREATE_DIR prefix. */
CURLOPT(CURLOPT_FTP_CREATE_MISSING_DIRS, CURLOPTTYPE_LONG, 110),
/* Set this to a bitmask value to enable the particular authentications
@@ -1589,7 +1588,7 @@ typedef enum {
CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
CURLUSESSL_CONTROL - SSL for the control connection or fail
CURLUSESSL_ALL - SSL for all communication or fail
- */
+ */
CURLOPT(CURLOPT_USE_SSL, CURLOPTTYPE_VALUES, 119),
/* The _LARGE version of the standard POSTFIELDSIZE option */
@@ -1615,7 +1614,7 @@ typedef enum {
CURLFTPAUTH_DEFAULT - let libcurl decide
CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
- */
+ */
CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),
CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
@@ -1650,8 +1649,7 @@ typedef enum {
CURLOPT(CURLOPT_LOCALPORT, CURLOPTTYPE_LONG, 139),
/* Number of ports to try, including the first one set with LOCALPORT.
- Thus, setting it to 1 makes no additional attempts but the first.
- */
+ Thus, setting it to 1 makes no additional attempts but the first. */
CURLOPT(CURLOPT_LOCALPORTRANGE, CURLOPTTYPE_LONG, 140),
/* no transfer, set up connection and let application use the socket by
diff --git a/include/curl/curlver.h b/include/curl/curlver.h
index 4a673da466..98d10c4fc2 100644
--- a/include/curl/curlver.h
+++ b/include/curl/curlver.h
@@ -56,8 +56,7 @@
Note: This define is the full hex number and _does not_ use the
CURL_VERSION_BITS() macro since curl's own configure script greps for it
- and needs it to contain the full number.
-*/
+ and needs it to contain the full number. */
#define LIBCURL_VERSION_NUM 0x081600
/*
diff --git a/include/curl/multi.h b/include/curl/multi.h
index 060b73eeec..8cef6e774e 100644
--- a/include/curl/multi.h
+++ b/include/curl/multi.h
@@ -24,20 +24,20 @@
*
***************************************************************************/
/*
- This is an "external" header file. Do not give away any internals here!
-
- GOALS
-
- o Enable a "pull" interface. The application that uses libcurl decides where
- and when to ask libcurl to get/send data.
-
- o Enable multiple simultaneous transfers in the same thread without making it
- complicated for the application.
-
- o Enable the application to select() on its own file descriptors and curl's
- file descriptors simultaneous easily.
-
-*/
+ * This is an "external" header file. Do not give away any internals here!
+ *
+ * GOALS
+ *
+ * o Enable a "pull" interface. The application that uses libcurl decides where
+ * and when to ask libcurl to get/send data.
+ *
+ * o Enable multiple simultaneous transfers in the same thread without making
+ * it complicated for the application.
+ *
+ * o Enable the application to select() on its own file descriptors and curl's
+ * file descriptors simultaneous easily.
+ *
+ */
/*
* This header file should not really need to include "curl.h" since curl.h
diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c
index 106c7333f5..72bfda510a 100644
--- a/lib/asyn-ares.c
+++ b/lib/asyn-ares.c
@@ -148,7 +148,7 @@ static CURLcode async_ares_init(struct Curl_easy *data,
if c-ares >= 1.24.0, user can set the timeout via /etc/resolv.conf to
overwrite c-ares' timeout.
- */
+ */
DEBUGASSERT(ares_ver);
if(ares_ver < 0x011400) {
options.timeout = CARES_TIMEOUT_PER_ATTEMPT;
diff --git a/lib/cookie.c b/lib/cookie.c
index 91dc8d5fd0..83baf435f1 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -48,8 +48,7 @@
future. (from RFC6265bis draft-19)
For the sake of easier testing, align the capped time to an even 60 second
- boundary.
-*/
+ boundary. */
static void cap_expires(time_t now, struct Cookie *co)
{
if(co->expires && (TIME_T_MAX - COOKIES_MAXAGE - 30) > now) {
@@ -335,15 +334,14 @@ static bool bad_domain(const char *domain, size_t len)
}
#endif
-/*
- RFC 6265 section 4.1.1 says a server should accept this range:
+/* RFC 6265 section 4.1.1 says a server should accept this range:
- cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
+ cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E
- Yet, Firefox and Chrome as of June 2022 accept space, comma and double-quotes
- fine. The prime reason for filtering out control bytes is that some HTTP
- servers return 400 for requests that contain such.
-*/
+ Yet, Firefox and Chrome as of June 2022 accept space, comma and
+ double-quotes fine. The prime reason for filtering out control bytes is that
+ some HTTP servers return 400 for requests that contain such.
+ */
static bool invalid_octets(const char *ptr, size_t len)
{
const unsigned char *p = (const unsigned char *)ptr;
@@ -359,8 +357,7 @@ static bool invalid_octets(const char *ptr, size_t len)
/* The maximum length we accept a date string for the 'expire' keyword. The
standard date formats are within the 30 bytes range. This adds an extra
- margin to make sure it realistically works with what is used out there.
-*/
+ margin to make sure it realistically works with what is used out there. */
#define MAX_DATE_LENGTH 80
#define COOKIE_NAME 0
diff --git a/lib/cookie.h b/lib/cookie.h
index b8ef8b8ea1..286c47fd3a 100644
--- a/lib/cookie.h
+++ b/lib/cookie.h
@@ -72,7 +72,7 @@ struct CookieInfo {
In the 6265bis draft document section 5.4 it is phrased even stronger: "If
the sum of the lengths of the name string and the value string is more than
4096 octets, abort these steps and ignore the set-cookie-string entirely."
-*/
+ */
/** Limits for INCOMING cookies **/
diff --git a/lib/curl_config-cmake.h.in b/lib/curl_config-cmake.h.in
index fbafbc088a..97d8f54f5a 100644
--- a/lib/curl_config-cmake.h.in
+++ b/lib/curl_config-cmake.h.in
@@ -349,7 +349,7 @@
#cmakedefine HAVE_IOCTLSOCKET_CAMEL 1
/* Define to 1 if you have a working IoctlSocket camel case FIONBIO function.
- */
+ */
#cmakedefine HAVE_IOCTLSOCKET_CAMEL_FIONBIO 1
/* Define to 1 if you have a working ioctlsocket FIONBIO function. */
@@ -607,14 +607,12 @@
/* cpu-machine-OS */
#cmakedefine CURL_OS ${CURL_OS}
-/*
- Note: SIZEOF_* variables are fetched with CMake through check_type_size().
- As per CMake documentation on CheckTypeSize, C preprocessor code is
- generated by CMake into SIZEOF_*_CODE. This is what we use in the
- following statements.
-
- Reference: https://cmake.org/cmake/help/latest/module/CheckTypeSize.html
-*/
+/* Note: SIZEOF_* variables are fetched with CMake through check_type_size().
+ As per CMake documentation on CheckTypeSize, C preprocessor code is
+ generated by CMake into SIZEOF_*_CODE. This is what we use in the
+ following statements.
+ Ref: https://cmake.org/cmake/help/latest/module/CheckTypeSize.html
+ */
/* The size of `int', as computed by sizeof. */
${SIZEOF_INT_CODE}
diff --git a/lib/curl_fopen.c b/lib/curl_fopen.c
index abb17eab4b..75054ffb77 100644
--- a/lib/curl_fopen.c
+++ b/lib/curl_fopen.c
@@ -30,16 +30,15 @@
#include "rand.h"
#include "curl_fopen.h"
-/*
- The dirslash() function breaks a null-terminated pathname string into
- directory and filename components then returns the directory component up
- to, *AND INCLUDING*, a final '/'. If there is no directory in the path,
- this instead returns a "" string.
+/* The dirslash() function breaks a null-terminated pathname string into
+ directory and filename components then returns the directory component up
+ to, *AND INCLUDING*, a final '/'. If there is no directory in the path,
+ this instead returns a "" string.
- This function returns a pointer to malloc'ed memory.
+ This function returns a pointer to malloc'ed memory.
- The input path to this function is expected to have a filename part.
-*/
+ The input path to this function is expected to have a filename part.
+ */
#ifdef _WIN32
#define PATHSEP "\\"
diff --git a/lib/curl_ntlm_core.c b/lib/curl_ntlm_core.c
index 58a446c95d..6978d42d93 100644
--- a/lib/curl_ntlm_core.c
+++ b/lib/curl_ntlm_core.c
@@ -551,7 +551,7 @@ CURLcode Curl_ntlm_core_mk_ntlmv2_resp(const unsigned char *ntlmv2hash,
unsigned char **ntresp,
unsigned int *ntresp_len)
{
- /* NTLMv2 response structure :
+ /* NTLMv2 response structure:
-----------------------------------------------------------------------------
0 HMAC MD5 16 bytes
------BLOB-------------------------------------------------------------------
diff --git a/lib/curl_setup.h b/lib/curl_setup.h
index 5a5d8dbf1f..487a3c5e39 100644
--- a/lib/curl_setup.h
+++ b/lib/curl_setup.h
@@ -1250,19 +1250,17 @@ typedef unsigned int curl_bit;
#endif
/* In Windows the default file mode is text but an application can override it.
-Therefore we specify it explicitly. https://github.com/curl/curl/pull/258
-*/
+ Therefore we specify it explicitly. https://github.com/curl/curl/pull/258 */
#if defined(_WIN32) || defined(MSDOS)
#define FOPEN_READTEXT "rt"
#define FOPEN_WRITETEXT "wt"
#define FOPEN_APPENDTEXT "at"
#elif defined(__CYGWIN__)
/* Cygwin has specific behavior we need to address when _WIN32 is not defined.
-https://cygwin.com/cygwin-ug-net/using-textbinary.html
-For write we want our output to have line endings of LF and be compatible with
-other Cygwin utilities. For read we want to handle input that may have line
-endings either CRLF or LF so 't' is appropriate.
-*/
+ https://cygwin.com/cygwin-ug-net/using-textbinary.html
+ For write we want our output to have line endings of LF and be compatible
+ with other Cygwin utilities. For read we want to handle input that may have
+ line endings either CRLF or LF so 't' is appropriate. */
#define FOPEN_READTEXT "rt"
#define FOPEN_WRITETEXT "w"
#define FOPEN_APPENDTEXT "a"
diff --git a/lib/curlx/basename.c b/lib/curlx/basename.c
index d2fd160ff2..eda3d1195a 100644
--- a/lib/curlx/basename.c
+++ b/lib/curlx/basename.c
@@ -27,30 +27,28 @@
#include "curlx/basename.h"
-/*
- (Quote from The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004
- Edition)
+/* (Quote from The Open Group Base Specifications Issue 6 IEEE Std 1003.1, 2004
+ Edition)
- The basename() function shall take the pathname pointed to by path and
- return a pointer to the final component of the pathname, deleting any
- trailing '/' characters.
+ The basename() function shall take the pathname pointed to by path and
+ return a pointer to the final component of the pathname, deleting any
+ trailing '/' characters.
- If the string pointed to by path consists entirely of the '/' character,
- basename() shall return a pointer to the string "/". If the string pointed
- to by path is exactly "//", it is implementation-defined whether '/' or "//"
- is returned.
+ If the string pointed to by path consists entirely of the '/' character,
+ basename() shall return a pointer to the string "/". If the string pointed
+ to by path is exactly "//", it is implementation-defined whether '/' or "//"
+ is returned.
- If path is a null pointer or points to an empty string, basename() shall
- return a pointer to the string ".".
+ If path is a null pointer or points to an empty string, basename() shall
+ return a pointer to the string ".".
- The basename() function may modify the string pointed to by path, and may
- return a pointer to static storage that may then be overwritten by a
- subsequent call to basename().
+ The basename() function may modify the string pointed to by path, and may
+ return a pointer to static storage that may then be overwritten by a
+ subsequent call to basename().
- The basename() function need not be reentrant. A function that is not
- required to be reentrant is not required to be thread-safe.
-
-*/
+ The basename() function need not be reentrant. A function that is not
+ required to be reentrant is not required to be thread-safe.
+ */
char *curlx_basename(char *path)
{
/* Ignore all the details above for now and make a quick and simple
diff --git a/lib/curlx/strparse.h b/lib/curlx/strparse.h
index c7801b2cb3..7963dd6212 100644
--- a/lib/curlx/strparse.h
+++ b/lib/curlx/strparse.h
@@ -106,8 +106,7 @@ void curlx_str_passblanks(const char **linep);
/* given a hexadecimal letter, return the binary value. '0' returns 0, 'a'
returns 10. THIS ONLY WORKS ON VALID HEXADECIMAL LETTER INPUT. Verify
- before calling this!
-*/
+ before calling this. */
extern const unsigned char curlx_hexasciitable[];
#define curlx_hexval(x) (unsigned char)(curlx_hexasciitable[(x) - '0'] & 0x0f)
diff --git a/lib/fake_addrinfo.c b/lib/fake_addrinfo.c
index 030dc35283..6857d63485 100644
--- a/lib/fake_addrinfo.c
+++ b/lib/fake_addrinfo.c
@@ -129,14 +129,10 @@ static struct addrinfo *mk_getaddrinfo(const struct ares_addrinfo *aihead)
return cafirst;
}
-/*
- RETURN VALUE
-
- getaddrinfo() returns 0 if it succeeds, or one of the following nonzero
- error codes:
-
- ...
-*/
+/* RETURN VALUE
+ getaddrinfo() returns 0 if it succeeds, or one of the following nonzero
+ error codes:
+ ... */
int r_getaddrinfo(const char *node,
const char *service,
const struct addrinfo *hints,
diff --git a/lib/file.c b/lib/file.c
index fff8feeb92..9c151643f9 100644
--- a/lib/file.c
+++ b/lib/file.c
@@ -177,8 +177,7 @@ static CURLcode file_connect(struct Curl_easy *data, bool *done)
On other platforms, we need the slash to indicate an
absolute pathname. On Windows, absolute paths start
- with a drive letter.
- */
+ with a drive letter. */
actual_path = real_path;
if((actual_path[0] == '/') &&
actual_path[1] &&
@@ -388,8 +387,7 @@ static CURLcode file_do(struct Curl_easy *data, bool *done)
/* This implementation ignores the hostname in conformance with
RFC 1738. Only local files (reachable via the standard file system)
are supported. This means that files on remotely mounted directories
- (via NFS, Samba, NT sharing) can be accessed through a file:// URL
- */
+ (via NFS, Samba, NT sharing) can be accessed through a file:// URL */
struct FILEPROTO *file = Curl_meta_get(data, CURL_META_FILE_EASY);
CURLcode result = CURLE_OK;
curlx_struct_stat statbuf;
diff --git a/lib/ftp.c b/lib/ftp.c
index 338a7280b0..c5725c48ec 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -232,12 +232,10 @@ static CURLcode ftp_parse_url_path(struct Curl_easy *data,
if((pathLen > 0) && (rawPath[pathLen - 1] != '/'))
fileName = rawPath; /* this is a full file path */
- /*
- else: ftpc->file is not used anywhere other than for operations on
- a file. In other words, never for directory operations,
- so we can safely leave filename as NULL here and use it as a
- argument in dir/file decisions.
- */
+ /* else: ftpc->file is not used anywhere other than for operations on
+ a file. In other words, never for directory operations,
+ so we can safely leave filename as NULL here and use it as a
+ argument in dir/file decisions. */
break;
case FTPFILE_SINGLECWD:
@@ -820,8 +818,7 @@ static const char *pathpiece(struct ftp_conn *ftpc, int num)
ftp_state_cwd() sends the range of CWD commands to the server to change to
the correct directory. It may also need to send MKD commands to create
- missing ones, if that option is enabled.
-*/
+ missing ones, if that option is enabled. */
static CURLcode ftp_state_cwd(struct Curl_easy *data,
struct ftp_conn *ftpc,
struct FTP *ftp)
@@ -1415,19 +1412,17 @@ static CURLcode ftp_state_use_pasv(struct Curl_easy *data,
struct connectdata *conn)
{
CURLcode result = CURLE_OK;
- /*
- Here's the executive summary on what to do:
+ /* Here's the executive summary on what to do:
- PASV is RFC959, expect:
- 227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)
+ PASV is RFC959, expect:
+ 227 Entering Passive Mode (a1,a2,a3,a4,p1,p2)
- LPSV is RFC1639, expect:
- 228 Entering Long Passive Mode (4,4,a1,a2,a3,a4,2,p1,p2)
+ LPSV is RFC1639, expect:
+ 228 Entering Long Passive Mode (4,4,a1,a2,a3,a4,2,p1,p2)
- EPSV is RFC2428, expect:
- 229 Entering Extended Passive Mode (|||port|)
-
- */
+ EPSV is RFC2428, expect:
+ 229 Entering Extended Passive Mode (|||port|)
+ */
static const char mode[][5] = { "EPSV", "PASV" };
int modeoff;
@@ -1550,14 +1545,12 @@ static CURLcode ftp_state_list(struct Curl_easy *data,
way. It has turned out that the NLST list output is not the same on all
servers either... */
- /*
- if FTPFILE_NOCWD was specified, we should add the path
+ /* if FTPFILE_NOCWD was specified, we should add the path
as argument for the LIST / NLST / or custom command.
Whether the server will support this, is uncertain.
The other ftp_filemethods will CWD into dir/dir/ first and
- then do LIST (in that case: nothing to do here)
- */
+ then do LIST (in that case: nothing to do here) */
const char *lstArg = NULL;
int lstArglen = 0;
char *cmd;
@@ -1948,8 +1941,7 @@ static CURLcode ftp_state_quote(struct Curl_easy *data,
In addition: asking for the size for 'TYPE A' transfers is not
constructive since servers do not report the converted size.
- Thus, skip it.
- */
+ Thus, skip it. */
result = Curl_pp_sendf(data, &ftpc->pp, "RETR %s", ftpc->file);
if(!result)
ftp_state(data, ftpc, FTP_RETR);
@@ -3045,7 +3037,7 @@ static CURLcode ftp_pwd_resp(struct Curl_easy *data,
The directory name can contain any character; embedded
double-quotes should be escaped by double-quotes (the
"quote-doubling" convention).
- */
+ */
/* scan for the first double-quote for non-standard responses */
while(*ptr != '\n' && *ptr != '\0' && *ptr != '"')
@@ -3321,7 +3313,7 @@ static CURLcode ftp_pp_statemachine(struct Curl_easy *data,
/* Reply format is like
215
- */
+ */
while(*ptr == ' ')
ptr++;
for(start = ptr; *ptr && *ptr != ' '; ptr++)
@@ -4340,8 +4332,7 @@ static CURLcode ftp_disconnect(struct Curl_easy *data,
disconnect wait in vain and cause more problems than we need to.
ftp_quit() will check the state of ftp->ctl_valid. If it is ok it
- will try to send the QUIT command, otherwise it will return.
- */
+ will try to send the QUIT command, otherwise it will return. */
ftpc->shutdown = TRUE;
if(dead_connection || Curl_pp_needs_flush(data, &ftpc->pp))
ftpc->ctl_valid = FALSE;
diff --git a/lib/functypes.h b/lib/functypes.h
index 3938295dd1..7fcee834ff 100644
--- a/lib/functypes.h
+++ b/lib/functypes.h
@@ -33,7 +33,7 @@
1. For systems that run configure or cmake, the alternatives are provided
here.
2. For systems with config-*.h files, define them there.
-*/
+ */
#ifdef USE_WINSOCK
/* int recv(SOCKET, char *, int, int) */
diff --git a/lib/gopher.c b/lib/gopher.c
index 39f4bc0efc..9781ffff63 100644
--- a/lib/gopher.c
+++ b/lib/gopher.c
@@ -147,8 +147,7 @@ static CURLcode gopher_do(struct Curl_easy *data, bool *done)
BLOCKING behavior which is a NO-NO. This function should rather be
split up in a do and a doing piece where the pieces that are not
possible to send now will be sent in the doing function repeatedly
- until the entire request is sent.
- */
+ until the entire request is sent. */
what = SOCKET_WRITABLE(sockfd, timeout_ms);
if(what < 0) {
result = CURLE_SEND_ERROR;
diff --git a/lib/hash.h b/lib/hash.h
index 1d7d3de8ce..d4c73b7786 100644
--- a/lib/hash.h
+++ b/lib/hash.h
@@ -31,8 +31,8 @@ typedef size_t (*hash_function)(void *key,
size_t slots_num);
/*
- Comparator function prototype. Compares two keys.
-*/
+ * Comparator function prototype. Compares two keys.
+ */
typedef size_t (*comp_function)(void *key1,
size_t key1_len,
void *key2,
diff --git a/lib/http.c b/lib/http.c
index 487973e06c..bc3212036d 100644
--- a/lib/http.c
+++ b/lib/http.c
@@ -167,8 +167,7 @@ char *Curl_checkProxyheaders(struct Curl_easy *data,
#endif
/* If the header has a value, this function returns TRUE and the value is in
- 'outp' with blanks trimmed off.
-*/
+ 'outp' with blanks trimmed off. */
static bool header_has_value(const char **headerp, struct Curl_str *outp)
{
bool value = !curlx_str_cspn(headerp, outp, ";:") &&
@@ -3359,7 +3358,7 @@ static CURLcode http_header_c(struct Curl_easy *data,
JavaWebServer/1.1.1 obviously sends the header this way!
The third added since some servers use that!
The fourth means the requested range was unsatisfied.
- */
+ */
const char *ptr = v;
@@ -4344,8 +4343,7 @@ static CURLcode http_rw_hd(struct Curl_easy *data,
if(!fine_statusline) {
/* If user has set option HTTP200ALIASES,
- compare header line against list of aliases
- */
+ compare header line against list of aliases */
statusline check = checkhttpprefix(data, hd, hdlen);
if(check == STATUS_DONE) {
fine_statusline = TRUE;
diff --git a/lib/http.h b/lib/http.h
index 5050215743..83b4cc6c64 100644
--- a/lib/http.h
+++ b/lib/http.h
@@ -137,8 +137,7 @@ CURLcode Curl_http_follow(struct Curl_easy *data, const char *newurl,
will always be unconditionally sent and thus it may not be larger than can
always be afforded to send twice.
- It must not be greater than 64K to work on VMS.
-*/
+ It must not be greater than 64K to work on VMS. */
#ifndef MAX_INITIAL_POST_SIZE
#define MAX_INITIAL_POST_SIZE (64 * 1024)
#endif
diff --git a/lib/http_aws_sigv4.c b/lib/http_aws_sigv4.c
index a1b1120964..d4ad7cc5f0 100644
--- a/lib/http_aws_sigv4.c
+++ b/lib/http_aws_sigv4.c
@@ -223,8 +223,7 @@ static CURLcode uri_encode_path(struct Curl_str *original_path,
}
/* Normalize the query part. Make sure %2B is left percent encoded, and not
- decoded to plus, then encoded to space.
-*/
+ decoded to plus, then encoded to space. */
static CURLcode normalize_query(const char *string, size_t len,
struct dynbuf *db)
{
@@ -827,8 +826,7 @@ static CURLcode parse_sigv4_params(struct Curl_easy *data,
/* provider0[:provider1[:region[:service]]]
- No string can be longer than N bytes of non-whitespace
- */
+ No string can be longer than N bytes of non-whitespace */
if(curlx_str_until(&line, provider0, MAX_SIGV4_LEN, ':')) {
failf(data, "first aws-sigv4 provider cannot be empty");
return CURLE_BAD_FUNCTION_ARGUMENT;
diff --git a/lib/http_chunks.c b/lib/http_chunks.c
index fe8e98bd17..85f453eb59 100644
--- a/lib/http_chunks.c
+++ b/lib/http_chunks.c
@@ -194,8 +194,7 @@ static CURLcode httpchunk_readwrite(struct Curl_easy *data,
case CHUNK_DATA:
/* We expect 'datasize' of data. We have 'blen' right now, it can be
- more or less than 'datasize'. Get the smallest piece.
- */
+ more or less than 'datasize'. Get the smallest piece. */
piece = blen;
if(ch->datasize < (curl_off_t)blen)
piece = curlx_sotouz(ch->datasize);
diff --git a/lib/http_digest.c b/lib/http_digest.c
index 25783d0969..31a9db35a8 100644
--- a/lib/http_digest.c
+++ b/lib/http_digest.c
@@ -33,11 +33,9 @@
/* Test example headers:
-WWW-Authenticate: Digest realm="testrealm", nonce="1053604598"
-Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598"
-
-*/
-
+ WWW-Authenticate: Digest realm="testrealm", nonce="1053604598"
+ Proxy-Authenticate: Digest realm="testrealm", nonce="1053604598"
+ */
CURLcode Curl_input_digest(struct Curl_easy *data,
bool proxy,
const char *header) /* rest of the *-authenticate:
diff --git a/lib/llist.c b/lib/llist.c
index ce0c59cc50..6528ebaef2 100644
--- a/lib/llist.c
+++ b/lib/llist.c
@@ -211,8 +211,7 @@ struct Curl_llist_node *Curl_llist_head(const struct Curl_llist *list)
/* llist_tail() returns the last 'struct Curl_llist_node *', which might be
NULL
- @unittest 1300
-*/
+ @unittest 1300 */
UNITTEST struct Curl_llist_node *llist_tail(const struct Curl_llist *list);
UNITTEST struct Curl_llist_node *llist_tail(const struct Curl_llist *list)
{
@@ -251,8 +250,7 @@ struct Curl_llist_node *Curl_node_next(const struct Curl_llist_node *n)
/* llist_node_prev() returns the previous element in a list from a given
Curl_llist_node
- @unittest 1300
-*/
+ @unittest 1300 */
UNITTEST struct Curl_llist_node *llist_node_prev(
const struct Curl_llist_node *n);
UNITTEST struct Curl_llist_node *llist_node_prev(
diff --git a/lib/multi.c b/lib/multi.c
index c18d30be19..0732c7bfba 100644
--- a/lib/multi.c
+++ b/lib/multi.c
@@ -51,11 +51,9 @@
/* initial multi->xfers table size for a full multi */
#define CURL_XFER_TABLE_SIZE 512
-/*
- CURL_SOCKET_HASH_TABLE_SIZE should be a prime number. Increasing it from 97
- to 911 takes on a 32-bit machine 4 x 804 = 3211 more bytes. Still, every
- curl handle takes 6K memory, therefore this 3K are not significant.
-*/
+/* CURL_SOCKET_HASH_TABLE_SIZE should be a prime number. Increasing it from 97
+ to 911 takes on a 32-bit machine 4 x 804 = 3211 more bytes. Still, every
+ curl handle takes 6K memory, therefore this 3K are not significant. */
#ifndef CURL_SOCKET_HASH_TABLE_SIZE
#define CURL_SOCKET_HASH_TABLE_SIZE 911
#endif
@@ -861,8 +859,7 @@ CURLMcode Curl_multi_remove_handle(struct Curl_multi *multi,
forbidden from reuse. This easy handle cannot find the connection
anymore once removed from the multi handle
- Better close the connection here, at once.
- */
+ Better close the connection here, at once. */
struct connectdata *c;
curl_socket_t s;
s = Curl_getconnectinfo(data, &c);
@@ -3898,8 +3895,7 @@ static void move_pending_to_connect(struct Curl_multi *multi,
it can potentially allow hundreds of new transfers.
We could consider an improvement where we store the queue reason and allow
- more pipewait rechecks than others.
-*/
+ more pipewait rechecks than others. */
static void process_pending_handles(struct Curl_multi *multi)
{
uint32_t mid = multi->last_pending_mid;
diff --git a/lib/parsedate.c b/lib/parsedate.c
index b19423169a..ec9f21296b 100644
--- a/lib/parsedate.c
+++ b/lib/parsedate.c
@@ -27,59 +27,57 @@
#include "curlx/strparse.h"
#include "curlx/strcopy.h"
-/*
- A brief summary of the date string formats this parser groks:
+/* A brief summary of the date string formats this parser groks:
- RFC 2616 3.3.1
+ RFC 2616 3.3.1
- Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
- Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
- Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
+ Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123
+ Sunday, 06-Nov-94 08:49:37 GMT ; RFC 850, obsoleted by RFC 1036
+ Sun Nov 6 08:49:37 1994 ; ANSI C's asctime() format
- we support dates without week day name:
+ we support dates without week day name:
- 06 Nov 1994 08:49:37 GMT
- 06-Nov-94 08:49:37 GMT
- Nov 6 08:49:37 1994
+ 06 Nov 1994 08:49:37 GMT
+ 06-Nov-94 08:49:37 GMT
+ Nov 6 08:49:37 1994
- without the time zone:
+ without the time zone:
- 06 Nov 1994 08:49:37
- 06-Nov-94 08:49:37
+ 06 Nov 1994 08:49:37
+ 06-Nov-94 08:49:37
- weird order:
+ weird order:
- 1994 Nov 6 08:49:37 (GNU date fails)
- GMT 08:49:37 06-Nov-94 Sunday
- 94 6 Nov 08:49:37 (GNU date fails)
+ 1994 Nov 6 08:49:37 (GNU date fails)
+ GMT 08:49:37 06-Nov-94 Sunday
+ 94 6 Nov 08:49:37 (GNU date fails)
- time left out:
+ time left out:
- 1994 Nov 6
- 06-Nov-94
- Sun Nov 6 94
+ 1994 Nov 6
+ 06-Nov-94
+ Sun Nov 6 94
- unusual separators:
+ unusual separators:
- 1994.Nov.6
- Sun/Nov/6/94/GMT
+ 1994.Nov.6
+ Sun/Nov/6/94/GMT
- commonly used time zone names:
+ commonly used time zone names:
- Sun, 06 Nov 1994 08:49:37 CET
- 06 Nov 1994 08:49:37 EST
+ Sun, 06 Nov 1994 08:49:37 CET
+ 06 Nov 1994 08:49:37 EST
- time zones specified using RFC822 style:
+ time zones specified using RFC822 style:
- Sun, 12 Sep 2004 15:05:58 -0700
- Sat, 11 Sep 2004 21:32:11 +0200
+ Sun, 12 Sep 2004 15:05:58 -0700
+ Sat, 11 Sep 2004 21:32:11 +0200
- compact numerical date strings:
+ compact numerical date strings:
- 20040912 15:05:58 -0700
- 20040911 +0200
-
-*/
+ 20040912 15:05:58 -0700
+ 20040911 +0200
+ */
#if !defined(CURL_DISABLE_PARSEDATE) || !defined(CURL_DISABLE_FTP) || \
!defined(CURL_DISABLE_FILE) || defined(USE_GNUTLS)
@@ -193,8 +191,7 @@ static const struct tzinfo tz[] = {
/* returns:
-1 no day
0 monday - 6 sunday
-*/
-
+ */
static int checkday(const char *check, size_t len)
{
int i;
diff --git a/lib/progress.c b/lib/progress.c
index 45e3db14f5..3c0f3d57d7 100644
--- a/lib/progress.c
+++ b/lib/progress.c
@@ -33,8 +33,7 @@
#ifndef CURL_DISABLE_PROGRESS_METER
/* Provide a string that is 7 letters long (plus the zero byte).
- @unittest 1636
-*/
+ @unittest 1636 */
UNITTEST void time2str(char *r, size_t rsize, curl_off_t seconds);
UNITTEST void time2str(char *r, size_t rsize, curl_off_t seconds)
{
@@ -83,8 +82,7 @@ UNITTEST void time2str(char *r, size_t rsize, curl_off_t seconds)
but never longer than 6 columns (+ one zero byte).
Add suffix k, M, G when suitable...
- @unittest 1636
-*/
+ @unittest 1636 */
UNITTEST char *max6out(curl_off_t bytes, char *max6, size_t mlen);
UNITTEST char *max6out(curl_off_t bytes, char *max6, size_t mlen)
{
@@ -176,8 +174,7 @@ const struct curltime *Curl_pgrs_now(struct Curl_easy *data)
return &data->progress.now;
}
-/*
- New proposed interface, 9th of February 2000:
+/* New proposed interface, 9th of February 2000:
pgrsStartNow() - sets start time
pgrsSetDownloadSize(x) - known expected download size
@@ -186,7 +183,7 @@ const struct curltime *Curl_pgrs_now(struct Curl_easy *data)
pgrsSetUploadCounter() - amount of data currently uploaded
pgrsUpdate() - show progress
pgrsDone() - transfer complete
-*/
+ */
int Curl_pgrsDone(struct Curl_easy *data)
{
diff --git a/lib/protocol.h b/lib/protocol.h
index 50e320d0f6..031bb834e4 100644
--- a/lib/protocol.h
+++ b/lib/protocol.h
@@ -209,8 +209,7 @@ struct Curl_protocol {
#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.
-*/
+ 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
diff --git a/lib/proxy.c b/lib/proxy.c
index 28738a15d6..b69d89a2ce 100644
--- a/lib/proxy.c
+++ b/lib/proxy.c
@@ -146,7 +146,7 @@ static bool match_host(const char *token, size_t tokenlen,
/* A: example.com matches 'example.com'
B: www.example.com matches 'example.com'
C: nonexample.com DOES NOT match 'example.com'
- */
+ */
if(tokenlen == namelen)
/* case A, exact match */
match = curl_strnequal(token, name, namelen);
diff --git a/lib/select.c b/lib/select.c
index 888490f2c9..281917bd70 100644
--- a/lib/select.c
+++ b/lib/select.c
@@ -287,12 +287,10 @@ int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms)
}
}
- /*
- Note also that Winsock ignores the first argument, so we do not worry
+ /* Note also that Winsock ignores the first argument, so we do not worry
about the fact that maxfd is computed incorrectly with Winsock (since
curl_socket_t is unsigned in such cases and thus -1 is the largest
- value).
- */
+ value). */
r = our_select(maxfd, &fds_read, &fds_write, &fds_err, timeout_ms);
if(r <= 0) {
if((r == -1) && (SOCKERRNO == SOCKEINTR))
diff --git a/lib/select.h b/lib/select.h
index dbbace4527..8fe519aee6 100644
--- a/lib/select.h
+++ b/lib/select.h
@@ -80,10 +80,8 @@ int Curl_socket_check(curl_socket_t readfd0,
int Curl_poll(struct pollfd ufds[], unsigned int nfds, timediff_t timeout_ms);
-/*
- With Winsock the valid range is [0..INVALID_SOCKET-1] according to
- https://learn.microsoft.com/windows/win32/winsock/socket-data-type-2
-*/
+/* With Winsock the valid range is [0..INVALID_SOCKET-1] according to
+ https://learn.microsoft.com/windows/win32/winsock/socket-data-type-2 */
#ifdef USE_WINSOCK
#define VALID_SOCK(s) ((s) < INVALID_SOCKET)
#define FDSET_SOCK(x) 1
diff --git a/lib/setopt.c b/lib/setopt.c
index e6a067c5e6..51cd58a7f9 100644
--- a/lib/setopt.c
+++ b/lib/setopt.c
@@ -1823,8 +1823,7 @@ static CURLcode setopt_copypostfields(const char *ptr, struct UserDefined *s)
else {
/* Allocate even when size == 0. This satisfies the need of possible
later address compare to detect the COPYPOSTFIELDS mode, and to mark
- that postfields is used rather than read function or form data.
- */
+ that postfields is used rather than read function or form data. */
char *p = curlx_memdup0(ptr, pflen);
if(!p)
return CURLE_OUT_OF_MEMORY;
diff --git a/lib/sha256.c b/lib/sha256.c
index 670532a325..e2278d3664 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -382,12 +382,11 @@ static CURLcode my_sha256_init(void *in)
return CURLE_OK;
}
-/*
- Process a block of memory though the hash
+/* Process a block of memory though the hash
@param md The hash state
@param in The data to hash
@param inlen The length of the data (octets)
-*/
+ */
static void my_sha256_update(void *ctx,
const unsigned char *in,
unsigned int len)
@@ -422,12 +421,11 @@ static void my_sha256_update(void *ctx,
}
}
-/*
- Terminate the hash to get the digest
+/* Terminate the hash to get the digest
@param md The hash state
@param out [out] The destination of the hash (32 bytes)
@return 0 if successful
-*/
+ */
static void my_sha256_final(unsigned char *out, void *ctx)
{
struct sha256_state *md = ctx;
diff --git a/lib/socks.c b/lib/socks.c
index 71c7d1bb56..67810d3fca 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -932,7 +932,7 @@ static CURLproxycode socks5_recv_resp1(struct socks_ctx *sx,
o IPv4 address: 0x01, BND.ADDR = 4-byte
o domain name: 0x03, BND.ADDR = [ 1-byte length, string ]
o IPv6 address: 0x04, BND.ADDR = 16-byte
- */
+ */
if(resp[0] != 5) { /* version */
failf(data, "SOCKS5 reply has wrong version, version should be 5.");
return CURLPX_BAD_VERSION;
@@ -1159,9 +1159,7 @@ static void socks_proxy_ctx_free(struct socks_ctx *ctx)
the next magic steps. If 'done' is not set TRUE, it is not done yet and
must be called again.
- Note: this function's sub-functions call failf()
-
-*/
+ Note: this function's sub-functions call failf() */
static CURLcode socks_proxy_cf_connect(struct Curl_cfilter *cf,
struct Curl_easy *data,
bool *done)
diff --git a/lib/url.c b/lib/url.c
index 4ec31a3e5b..1c837c586e 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -730,8 +730,7 @@ static bool url_match_connect_config(struct connectdata *conn,
it would take a lot of processing to make it really accurate. Instead,
this matching will assume that reuses of bound connections will most
likely also reuse the exact same binding parameters and missing out a
- few edge cases should not hurt anyone much.
- */
+ few edge cases should not hurt anyone much. */
if((conn->localport != m->needle->localport) ||
(conn->localportrange != m->needle->localportrange) ||
(m->needle->localdev &&
diff --git a/lib/urlapi.c b/lib/urlapi.c
index d546b18397..cbb16a43c4 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -209,7 +209,7 @@ size_t Curl_is_absolute_url(const char *url, char *buf, size_t buflen,
if(s && (ISALNUM(s) || (s == '+') || (s == '-') || (s == '.'))) {
/* RFC 3986 3.1 explains:
scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )
- */
+ */
}
else {
break;
@@ -388,8 +388,7 @@ UNITTEST CURLUcode parse_port(struct Curl_URL *u, struct dynbuf *host,
default port. Firefox, Chrome and Safari all do that.
Do not do it if the URL has no scheme, to make something that looks like
- a scheme not work!
- */
+ a scheme not work! */
curlx_dyn_setlen(host, keep);
portptr++;
if(!*portptr)
diff --git a/lib/urldata.h b/lib/urldata.h
index 16179318c0..b0c7af2344 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -1062,7 +1062,7 @@ struct UserDefined {
/* Despite the name, ftp_create_missing_dirs is for FTP(S) and SFTP
1 - create directories that do not exist
2 - the same but also allow MKD to fail once
- */
+ */
uint8_t ftp_create_missing_dirs;
#endif
uint8_t use_ssl; /* if AUTH TLS is to be attempted etc, for FTP or IMAP or
diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c
index 1818fc96c7..683933a953 100644
--- a/lib/vauth/digest.c
+++ b/lib/vauth/digest.c
@@ -751,16 +751,15 @@ static CURLcode auth_create_digest_http_message(
convert_to_ascii(hashbuf, (unsigned char *)userh);
}
- /*
- If the algorithm is "MD5" or unspecified (which then defaults to MD5):
+ /* If the algorithm is "MD5" or unspecified (which then defaults to MD5):
- A1 = unq(username-value) ":" unq(realm-value) ":" passwd
+ A1 = unq(username-value) ":" unq(realm-value) ":" passwd
- If the algorithm is "MD5-sess" then:
+ If the algorithm is "MD5-sess" then:
- A1 = H(unq(username-value) ":" unq(realm-value) ":" passwd) ":"
- unq(nonce-value) ":" unq(cnonce-value)
- */
+ A1 = H(unq(username-value) ":" unq(realm-value) ":" passwd) ":"
+ unq(nonce-value) ":" unq(cnonce-value)
+ */
hashthis = curl_maprintf("%s:%s:%s", userp, digest->realm ?
digest->realm : "", passwdp);
@@ -790,18 +789,17 @@ static CURLcode auth_create_digest_http_message(
convert_to_ascii(hashbuf, ha1);
}
- /*
- If the "qop" directive's value is "auth" or is unspecified, then A2 is:
+ /* If the "qop" directive's value is "auth" or is unspecified, then A2 is:
- A2 = Method ":" digest-uri-value
+ A2 = Method ":" digest-uri-value
- If the "qop" value is "auth-int", then A2 is:
+ If the "qop" value is "auth-int", then A2 is:
- A2 = Method ":" digest-uri-value ":" H(entity-body)
+ A2 = Method ":" digest-uri-value ":" H(entity-body)
- (The "Method" value is the HTTP request method as specified in section
- 5.1.1 of RFC 2616)
- */
+ (The "Method" value is the HTTP request method as specified in section
+ 5.1.1 of RFC 2616)
+ */
uri_quoted = auth_digest_string_quoted((const char *)uripath);
if(!uri_quoted) {
@@ -872,7 +870,7 @@ static CURLcode auth_create_digest_http_message(
web-safe characters. uri is already percent encoded. nc is 8 hex
characters. algorithm and qop with standard values only contain web-safe
characters.
- */
+ */
userp_quoted = auth_digest_string_quoted(digest->userhash ? userh : userp);
if(!userp_quoted) {
result = CURLE_OUT_OF_MEMORY;
diff --git a/lib/vauth/ntlm.c b/lib/vauth/ntlm.c
index 2803c05d9f..0be26b3cac 100644
--- a/lib/vauth/ntlm.c
+++ b/lib/vauth/ntlm.c
@@ -301,7 +301,7 @@ static CURLcode ntlm_decode_type2_target(struct Curl_easy *data,
2. A 'short' containing the allocated space for the buffer in bytes.
3. A 'long' containing the offset to the start of the buffer in bytes,
from the beginning of the NTLM message.
-*/
+ */
/*
* Curl_auth_is_ntlm_supported()
diff --git a/lib/vssh/libssh2.c b/lib/vssh/libssh2.c
index 672e9437c0..a17aa94004 100644
--- a/lib/vssh/libssh2.c
+++ b/lib/vssh/libssh2.c
@@ -3403,18 +3403,16 @@ static CURLcode ssh_connect(struct Curl_easy *data, bool *done)
#ifndef CURL_DISABLE_PROXY
if(conn->http_proxy.proxytype == CURLPROXY_HTTPS) {
- /*
- Setup libssh2 callbacks to make it read/write TLS from the socket.
+ /* Setup libssh2 callbacks to make it read/write TLS from the socket.
- ssize_t
- recvcb(libssh2_socket_t sock, void *buffer, size_t length,
- int flags, void **abstract);
+ ssize_t
+ recvcb(libssh2_socket_t sock, void *buffer, size_t length,
+ int flags, void **abstract);
- ssize_t
- sendcb(libssh2_socket_t sock, const void *buffer, size_t length,
- int flags, void **abstract);
-
- */
+ ssize_t
+ sendcb(libssh2_socket_t sock, const void *buffer, size_t length,
+ int flags, void **abstract);
+ */
#if LIBSSH2_VERSION_NUM >= 0x010b01
infof(data, "SSH: using HTTPS proxy");
#if defined(__clang__) && __clang_major__ >= 16
diff --git a/lib/vtls/apple.c b/lib/vtls/apple.c
index 2e132f2977..0535ca00c6 100644
--- a/lib/vtls/apple.c
+++ b/lib/vtls/apple.c
@@ -36,7 +36,7 @@
"SSL/TLS Strong Encryption: An Introduction"
https://httpd.apache.org/docs/2.0/ssl/ssl_intro.html
-*/
+ */
#include "curl_setup.h"
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c
index 23114937ae..9f576a9d52 100644
--- a/lib/vtls/openssl.c
+++ b/lib/vtls/openssl.c
@@ -2024,7 +2024,7 @@ static void ossl_close_all(struct Curl_easy *data)
in the certificate and must exactly match the IP in the URI.
This function is now used from ngtcp2 (QUIC) as well.
-*/
+ */
static CURLcode ossl_verifyhost(struct Curl_easy *data,
struct connectdata *conn,
struct ssl_peer *peer,
@@ -2110,8 +2110,7 @@ static CURLcode ossl_verifyhost(struct Curl_easy *data,
type itself: for example for an IA5String the data is ASCII"
It has been however verified that in 0.9.6 and 0.9.7, IA5String
- is always null-terminated.
- */
+ is always null-terminated. */
if((altlen == strlen(altptr)) &&
/* if this is not true, there was an embedded zero in the name
string and we cannot match it. */
@@ -3149,7 +3148,7 @@ static CURLcode ossl_populate_x509_store(struct Curl_cfilter *cf,
OpenSSL do alternate chain checking by default but we do not know how to
determine that in a reliable manner.
https://web.archive.org/web/20190422050538/rt.openssl.org/Ticket/Display.html?id=3621
- */
+ */
x509flags |= X509_V_FLAG_TRUSTED_FIRST;
if(!ssl_config->no_partialchain && !ssl_crlfile) {
@@ -3159,8 +3158,7 @@ static CURLcode ossl_populate_x509_store(struct Curl_cfilter *cf,
instead of needing the whole chain.
Due to OpenSSL bug https://github.com/openssl/openssl/issues/5081 we
- cannot do partial chains with a CRL check.
- */
+ cannot do partial chains with a CRL check. */
x509flags |= X509_V_FLAG_PARTIAL_CHAIN;
}
(void)X509_STORE_set_flags(store, x509flags);
@@ -3803,8 +3801,7 @@ CURLcode Curl_ossl_ctx_init(struct ossl_ctx *octx,
In 0.9.6e they added a bit to SSL_OP_ALL that _disables_ that workaround
despite the fact that SSL_OP_ALL is documented to do "rather harmless"
workarounds. In order to keep the secure workaround, the
- SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set.
- */
+ SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS bit must not be set. */
ctx_options = SSL_OP_ALL | SSL_OP_NO_TICKET | SSL_OP_NO_COMPRESSION;
diff --git a/lib/vtls/schannel.c b/lib/vtls/schannel.c
index accda3bbcc..6bbeb0487b 100644
--- a/lib/vtls/schannel.c
+++ b/lib/vtls/schannel.c
@@ -122,8 +122,7 @@
/* ALPN requires version 8.1 of the Windows SDK, which was
shipped with Visual Studio 2013, aka _MSC_VER 1800:
https://learn.microsoft.com/previous-versions/windows/it-pro/windows-server-2012-R2-and-2012/hh831771
- Or mingw-w64 9.0 or upper.
-*/
+ Or mingw-w64 9.0 or upper. */
#if (defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR >= 9) || \
(defined(_MSC_VER) && (_MSC_VER >= 1800) && !defined(_USING_V110_SDK71_))
#define HAS_ALPN_SCHANNEL
@@ -161,8 +160,7 @@ static CURLcode schannel_set_ssl_version_min_max(DWORD *enabled_protocols,
/* Windows Server 2022 and newer (including Windows 11) support TLS 1.3
built-in. Previous builds of Windows 10 had broken TLS 1.3
- implementations that could be enabled via registry.
- */
+ implementations that could be enabled via registry. */
if(curlx_verify_windows_version(10, 0, 20348, PLATFORM_WINNT,
VERSION_GREATER_THAN_EQUAL)) {
ssl_version_max = CURL_SSLVERSION_MAX_TLSv1_3;
@@ -432,7 +430,7 @@ static CURLcode get_client_cert(struct Curl_cfilter *cf,
if(fInCert || blob) {
/* Reading a .p12 or .pfx file, like the example at bottom of
https://learn.microsoft.com/archive/msdn-technet-forums/3e7bc95f-b21a-4bcd-bd2c-7f996718cae5
- */
+ */
CRYPT_DATA_BLOB datablob;
WCHAR *pszPassword;
size_t pwd_len = 0;
@@ -990,7 +988,7 @@ static CURLcode schannel_connect_step1(struct Curl_cfilter *cf,
At the moment we do not pass inbuf unless we are using ALPN since we only
use it for that, and WINE (for which we currently disable ALPN) is giving
us problems with inbuf regardless. https://github.com/curl/curl/issues/983
- */
+ */
sspi_status = Curl_pSecFn->InitializeSecurityContext(
&backend->cred->cred_handle, NULL, backend->cred->sni_hostname,
backend->req_flags, 0, 0,
@@ -1419,16 +1417,15 @@ static CURLcode schannel_connect_step2(struct Curl_cfilter *cf,
if(inbuf[1].BufferType == SECBUFFER_EXTRA && inbuf[1].cbBuffer > 0) {
SCH_DEV(infof(data, "schannel: encrypted data length: %lu",
inbuf[1].cbBuffer));
- /*
- There are two cases where we could be getting extra data here:
- 1. If we are renegotiating a connection and the handshake is already
- complete (from the server perspective), it can encrypted app data
- (not handshake data) in an extra buffer at this point.
- 2. (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a
- connection and this extra data is part of the handshake.
- We should process the data immediately; waiting for the socket to
- be ready may fail since the server is done sending handshake data.
- */
+ /* There are two cases where we could be getting extra data here:
+ 1. If we are renegotiating a connection and the handshake is already
+ complete (from the server perspective), it can encrypted app data
+ (not handshake data) in an extra buffer at this point.
+ 2. (sspi_status == SEC_I_CONTINUE_NEEDED) We are negotiating a
+ connection and this extra data is part of the handshake.
+ We should process the data immediately; waiting for the socket to
+ be ready may fail since the server is done sending handshake data.
+ */
/* check if the remaining data is less than the total amount
and therefore begins after the already processed data */
if(backend->encdata.offset > inbuf[1].cbBuffer) {
@@ -2030,21 +2027,19 @@ static CURLcode schannel_send(struct Curl_cfilter *cf, struct Curl_easy *data,
/* send the encrypted message including header, data and trailer */
len = outbuf[0].cbBuffer + outbuf[1].cbBuffer + outbuf[2].cbBuffer;
- /*
- it is important to send the full message which includes the header,
- encrypted payload, and trailer. Until the client receives all the
- data a coherent message has not been delivered and the client
- cannot read any of it.
+ /* it is important to send the full message which includes the header,
+ encrypted payload, and trailer. Until the client receives all the
+ data a coherent message has not been delivered and the client
+ cannot read any of it.
- If we wanted to buffer the unwritten encrypted bytes, we would
- tell the client that all data it has requested to be sent has been
- sent. The unwritten encrypted bytes would be the first bytes to
- send on the next invocation.
- Here's the catch with this - if we tell the client that all the
- bytes have been sent, does the client call this method again to
- send the buffered data? Looking at who calls this function, it
- seems the answer is NO.
- */
+ If we wanted to buffer the unwritten encrypted bytes, we would
+ tell the client that all data it has requested to be sent has been
+ sent. The unwritten encrypted bytes would be the first bytes to
+ send on the next invocation.
+ Here's the catch with this - if we tell the client that all the
+ bytes have been sent, does the client call this method again to
+ send the buffered data? Looking at who calls this function, it
+ seems the answer is NO. */
/* send entire message or fail */
while(len > *pnwritten) {
@@ -2162,8 +2157,7 @@ static CURLcode schannel_recv(struct Curl_cfilter *cf, struct Curl_easy *data,
}
/* it is debatable what to return when !len. Regardless we cannot return
immediately because there may be data to decrypt (in the case we want to
- decrypt all encrypted cached data) so handle !len later in cleanup.
- */
+ decrypt all encrypted cached data) so handle !len later in cleanup. */
else if(len && !backend->recv_connection_closed) {
/* the encrypted buffer must be large enough to hold all the bytes
requested and some TLS record overhead. 'len' is a buffer size, so this
@@ -2347,8 +2341,7 @@ cleanup:
The behavior here is a matter of debate. We do not want to be vulnerable
to a truncation attack however there is some browser precedent for
- ignoring the close_notify for compatibility reasons.
- */
+ ignoring the close_notify for compatibility reasons. */
if(len && !backend->decdata.offset && backend->recv_connection_closed &&
!backend->recv_sspi_close_notify) {
result = CURLE_RECV_ERROR;
@@ -2378,8 +2371,7 @@ cleanup:
/* it is debatable what to return when !len. We could return whatever error
we got from decryption but instead we override here so the return is
- consistent.
- */
+ consistent. */
if(!len)
return CURLE_OK;
diff --git a/lib/vtls/schannel_int.h b/lib/vtls/schannel_int.h
index b65ff79926..242f6a0f44 100644
--- a/lib/vtls/schannel_int.h
+++ b/lib/vtls/schannel_int.h
@@ -147,9 +147,7 @@ struct schannel_cert_share {
struct curltime time; /* when the cached store was created */
};
-/*
-* size of the structure: 20 bytes.
-*/
+/* size of the structure: 20 bytes */
struct num_ip_data {
DWORD size; /* 04 bytes */
union {
diff --git a/lib/vtls/vtls.c b/lib/vtls/vtls.c
index 816912a135..167c65763e 100644
--- a/lib/vtls/vtls.c
+++ b/lib/vtls/vtls.c
@@ -36,7 +36,7 @@
"SSL/TLS Strong Encryption: An Introduction"
https://httpd.apache.org/docs/2.0/ssl/ssl_intro.html
-*/
+ */
#include "curl_setup.h"
diff --git a/lib/vtls/vtls_config.c b/lib/vtls/vtls_config.c
index dfc1549c10..3e26e0bc8c 100644
--- a/lib/vtls/vtls_config.c
+++ b/lib/vtls/vtls_config.c
@@ -36,7 +36,7 @@
"SSL/TLS Strong Encryption: An Introduction"
https://httpd.apache.org/docs/2.0/ssl/ssl_intro.html
-*/
+ */
#include "curl_setup.h"
diff --git a/lib/ws.c b/lib/ws.c
index 335986c06a..cdaec3ba93 100644
--- a/lib/ws.c
+++ b/lib/ws.c
@@ -43,16 +43,15 @@
#include "curlx/strparse.h"
#include "curlx/strcopy.h"
-/***
- RFC 6455 Section 5.2
+/* RFC 6455 Section 5.2
- 0 1 2 3 4 5 6 7
- +-+-+-+-+-------+
- |F|R|R|R| opcode|
- |I|S|S|S| (4) |
- |N|V|V|V| |
- | |1|2|3| |
-*/
+ 0 1 2 3 4 5 6 7
+ +-+-+-+-+-------+
+ |F|R|R|R| opcode|
+ |I|S|S|S| (4) |
+ |N|V|V|V| |
+ | |1|2|3| |
+ */
#define WSBIT_FIN 0x80
#define WSBIT_RSV1 0x40
#define WSBIT_RSV2 0x20
@@ -854,28 +853,27 @@ static void ws_enc_init(struct ws_encoder *enc)
ws_enc_reset(enc);
}
-/***
- RFC 6455 Section 5.2
+/* RFC 6455 Section 5.2
- 0 1 2 3
- 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
- +-+-+-+-+-------+-+-------------+-------------------------------+
- |F|R|R|R| opcode|M| Payload len | Extended payload length |
- |I|S|S|S| (4) |A| (7) | (16/64) |
- |N|V|V|V| |S| | (if payload len==126/127) |
- | |1|2|3| |K| | |
- +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
- | Extended payload length continued, if payload len == 127 |
- + - - - - - - - - - - - - - - - +-------------------------------+
- | |Masking-key, if MASK set to 1 |
- +-------------------------------+-------------------------------+
- | Masking-key (continued) | Payload Data |
- +-------------------------------- - - - - - - - - - - - - - - - +
- : Payload Data continued ... :
- + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
- | Payload Data continued ... |
- +---------------------------------------------------------------+
-*/
+ 0 1 2 3
+ 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+ +-+-+-+-+-------+-+-------------+-------------------------------+
+ |F|R|R|R| opcode|M| Payload len | Extended payload length |
+ |I|S|S|S| (4) |A| (7) | (16/64) |
+ |N|V|V|V| |S| | (if payload len==126/127) |
+ | |1|2|3| |K| | |
+ +-+-+-+-+-------+-+-------------+ - - - - - - - - - - - - - - - +
+ | Extended payload length continued, if payload len == 127 |
+ + - - - - - - - - - - - - - - - +-------------------------------+
+ | |Masking-key, if MASK set to 1 |
+ +-------------------------------+-------------------------------+
+ | Masking-key (continued) | Payload Data |
+ +-------------------------------- - - - - - - - - - - - - - - - +
+ : Payload Data continued ... :
+ + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
+ | Payload Data continued ... |
+ +---------------------------------------------------------------+
+ */
static CURLcode ws_enc_add_frame(struct Curl_easy *data,
struct ws_encoder *enc,
@@ -1415,14 +1413,13 @@ CURLcode Curl_ws_accept(struct Curl_easy *data,
The sent value is the base64 encoded version of a SHA-1 hash done on the
|Sec-WebSocket-Key| header field concatenated with
- the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11".
- */
+ the string "258EAFA5-E914-47DA-95CA-C5AB0DC85B11". */
/* If the response includes a |Sec-WebSocket-Extensions| header field and
this header field indicates the use of an extension that was not present
in the client's handshake (the server has indicated an extension not
requested by the client), the client MUST Fail the WebSocket Connection.
- */
+ */
/* If the response includes a |Sec-WebSocket-Protocol| header field
and this header field indicates the use of a subprotocol that was
diff --git a/projects/vms/curl_crtl_init.c b/projects/vms/curl_crtl_init.c
index a044ee72e0..9c8e46761e 100644
--- a/projects/vms/curl_crtl_init.c
+++ b/projects/vms/curl_crtl_init.c
@@ -168,9 +168,7 @@ static int sys_crelnm(const char *logname, const char *value)
/* Start of DECC RTL Feature handling */
-/*
-** Sets default value for a feature
-*/
+/* Sets default value for a feature */
#ifdef __VAX
static void set_feature_default(const char *name, const char *value)
{
@@ -309,9 +307,9 @@ void (* const iniarray[])(void) = { set_features };
#endif
/*
-** Force a reference to LIB$INITIALIZE to ensure it
-** exists in the image.
-*/
+ * Force a reference to LIB$INITIALIZE to ensure it
+ * exists in the image.
+ */
int LIB$INITIALIZE(void);
#ifdef __DECC
#pragma extern_model strict_refdef
diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c
index cd046dcbad..2a69ce0f11 100644
--- a/src/tool_cb_dbg.c
+++ b/src/tool_cb_dbg.c
@@ -123,8 +123,8 @@ static void dump(const char *timebuf, const char *idsbuf, const char *text,
#define TRC_IDS_FORMAT_IDS_2 "[%" CURL_FORMAT_CURL_OFF_T "-%" \
CURL_FORMAT_CURL_OFF_T "] "
/*
-** callback for CURLOPT_DEBUGFUNCTION
-*/
+ * callback for CURLOPT_DEBUGFUNCTION
+ */
int tool_debug_cb(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userdata)
diff --git a/src/tool_cb_dbg.h b/src/tool_cb_dbg.h
index d78afb36ea..8df54a240f 100644
--- a/src/tool_cb_dbg.h
+++ b/src/tool_cb_dbg.h
@@ -26,9 +26,8 @@
#include "tool_setup.h"
/*
-** callback for CURLOPT_DEBUGFUNCTION
-*/
-
+ * callback for CURLOPT_DEBUGFUNCTION
+ */
int tool_debug_cb(CURL *handle, curl_infotype type,
char *data, size_t size,
void *userdata);
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index 918fe1907e..c54037f130 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -411,10 +411,10 @@ static size_t content_disposition(const char *str, const char *end,
}
/*
-** callback for CURLOPT_HEADERFUNCTION
-*
-* 'size' is always 1
-*/
+ * callback for CURLOPT_HEADERFUNCTION
+ *
+ * 'size' is always 1
+ */
size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
{
struct per_transfer *per = userdata;
diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h
index 37be591e70..07b50eb0dd 100644
--- a/src/tool_cb_hdr.h
+++ b/src/tool_cb_hdr.h
@@ -52,9 +52,8 @@ struct HdrCbData {
int tool_write_headers(struct HdrCbData *hdrcbdata, FILE *stream);
/*
-** callback for CURLOPT_HEADERFUNCTION
-*/
-
+ * callback for CURLOPT_HEADERFUNCTION
+ */
size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata);
#endif /* HEADER_CURL_TOOL_CB_HDR_H */
diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c
index b570923c41..60709426e4 100644
--- a/src/tool_cb_prg.c
+++ b/src/tool_cb_prg.c
@@ -36,8 +36,7 @@
my $pi = 3.1415;
foreach my $i (1 .. 200) {
printf "%d, ", sin($i / 200 * 2 * $pi) * 500000 + 500000;
- }
-*/
+ } */
static const int sinus[] = {
515704, 531394, 547052, 562664, 578214, 593687, 609068, 624341, 639491,
654504, 669364, 684057, 698568, 712883, 726989, 740870, 754513, 767906,
@@ -104,9 +103,8 @@ static void fly(struct ProgressData *bar, bool moved)
}
/*
-** callback for CURLOPT_XFERINFOFUNCTION
-*/
-
+ * callback for CURLOPT_XFERINFOFUNCTION
+ */
static void update_width(struct ProgressData *bar)
{
int cols = get_terminal_columns();
diff --git a/src/tool_cb_prg.h b/src/tool_cb_prg.h
index 9c2dda2d7e..5939d158da 100644
--- a/src/tool_cb_prg.h
+++ b/src/tool_cb_prg.h
@@ -45,9 +45,8 @@ struct OperationConfig;
void progressbarinit(struct ProgressData *bar, struct OperationConfig *config);
/*
-** callback for CURLOPT_PROGRESSFUNCTION
-*/
-
+ * callback for CURLOPT_PROGRESSFUNCTION
+ */
int tool_progress_cb(void *clientp,
curl_off_t dltotal, curl_off_t dlnow,
curl_off_t ultotal, curl_off_t ulnow);
diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c
index b5bc53a46e..bf9bd15ad6 100644
--- a/src/tool_cb_rea.c
+++ b/src/tool_cb_rea.c
@@ -68,9 +68,8 @@ static void waitfd(int waitms, int fd)
#endif
/*
-** callback for CURLOPT_READFUNCTION
-*/
-
+ * callback for CURLOPT_READFUNCTION
+ */
size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
{
ssize_t rc = 0;
@@ -153,9 +152,8 @@ size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
}
/*
-** callback for CURLOPT_XFERINFOFUNCTION used to unpause busy reads
-*/
-
+ * callback for CURLOPT_XFERINFOFUNCTION used to unpause busy reads
+ */
int tool_readbusy_cb(void *clientp,
curl_off_t dltotal, curl_off_t dlnow,
curl_off_t ultotal, curl_off_t ulnow)
diff --git a/src/tool_cb_rea.h b/src/tool_cb_rea.h
index 06899d3ef3..c44ceaaa0d 100644
--- a/src/tool_cb_rea.h
+++ b/src/tool_cb_rea.h
@@ -26,15 +26,13 @@
#include "tool_setup.h"
/*
-** callback for CURLOPT_READFUNCTION
-*/
-
+ * callback for CURLOPT_READFUNCTION
+ */
size_t tool_read_cb(char *buffer, size_t sz, size_t nmemb, void *userdata);
/*
-** callback for CURLOPT_XFERINFOFUNCTION used to unpause busy reads
-*/
-
+ * callback for CURLOPT_XFERINFOFUNCTION used to unpause busy reads
+ */
int tool_readbusy_cb(void *clientp,
curl_off_t dltotal, curl_off_t dlnow,
curl_off_t ultotal, curl_off_t ulnow);
diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c
index bb33bd2289..50e630d60d 100644
--- a/src/tool_cb_see.c
+++ b/src/tool_cb_see.c
@@ -28,12 +28,11 @@
#include "tool_cb_see.h"
/*
-** callback for CURLOPT_SEEKFUNCTION
-**
-** Notice that this is not supposed to return the resulting offset. This
-** shall only return CURL_SEEKFUNC_* return codes.
-*/
-
+ * callback for CURLOPT_SEEKFUNCTION
+ *
+ * Notice that this is not supposed to return the resulting offset. This
+ * shall only return CURL_SEEKFUNC_* return codes.
+ */
int tool_seek_cb(void *userdata, curl_off_t offset, int whence)
{
struct per_transfer *per = userdata;
diff --git a/src/tool_cb_see.h b/src/tool_cb_see.h
index e473223526..1cac0ace5c 100644
--- a/src/tool_cb_see.h
+++ b/src/tool_cb_see.h
@@ -26,8 +26,8 @@
#include "tool_setup.h"
/*
-** callback for CURLOPT_SEEKFUNCTION
-*/
+ * callback for CURLOPT_SEEKFUNCTION
+ */
int tool_seek_cb(void *userdata, curl_off_t offset, int whence);
#endif /* HEADER_CURL_TOOL_CB_SEE_H */
diff --git a/src/tool_cb_soc.c b/src/tool_cb_soc.c
index 0df0a1e6fb..ddc11ac868 100644
--- a/src/tool_cb_soc.c
+++ b/src/tool_cb_soc.c
@@ -30,11 +30,10 @@
#include "tool_cb_soc.h"
/*
-** callback for CURLOPT_OPENSOCKETFUNCTION
-**
-** Notice that only Linux is supported for the moment.
-*/
-
+ * callback for CURLOPT_OPENSOCKETFUNCTION
+ *
+ * Notice that only Linux is supported for the moment.
+ */
curl_socket_t tool_socket_open_mptcp_cb(void *clientp,
curlsocktype purpose,
struct curl_sockaddr *addr)
diff --git a/src/tool_cb_soc.h b/src/tool_cb_soc.h
index f02150aa82..d45d72a361 100644
--- a/src/tool_cb_soc.h
+++ b/src/tool_cb_soc.h
@@ -26,9 +26,8 @@
#include "tool_setup.h"
/*
-** callback for CURLOPT_OPENSOCKETFUNCTION
-*/
-
+ * callback for CURLOPT_OPENSOCKETFUNCTION
+ */
curl_socket_t tool_socket_open_mptcp_cb(void *clientp,
curlsocktype purpose,
struct curl_sockaddr *addr);
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index 133573a8b3..c67e3975d2 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -237,9 +237,8 @@ static size_t win_console(intptr_t fhnd, struct OutStruct *outs,
#endif /* _WIN32 */
/*
-** callback for CURLOPT_WRITEFUNCTION
-*/
-
+ * callback for CURLOPT_WRITEFUNCTION
+ */
size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
{
size_t rc;
diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
index 55502f440d..c99bd7c5e7 100644
--- a/src/tool_cb_wrt.h
+++ b/src/tool_cb_wrt.h
@@ -26,9 +26,8 @@
#include "tool_setup.h"
/*
-** callback for CURLOPT_WRITEFUNCTION
-*/
-
+ * callback for CURLOPT_WRITEFUNCTION
+ */
size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata);
/* create a local file for writing, return TRUE on success */
diff --git a/src/tool_formparse.c b/src/tool_formparse.c
index 7e6d625cb2..6d41711a40 100644
--- a/src/tool_formparse.c
+++ b/src/tool_formparse.c
@@ -69,9 +69,8 @@ static struct tool_mime *tool_mime_new_data(struct tool_mime *parent,
}
/*
-** unsigned size_t to signed curl_off_t
-*/
-
+ * unsigned size_t to signed curl_off_t
+ */
#define CURL_MASK_UCOFFT ((unsigned CURL_TYPEOF_CURL_OFF_T)~0)
#define CURL_MASK_SCOFFT (CURL_MASK_UCOFFT >> 1)
diff --git a/src/tool_getparam.c b/src/tool_getparam.c
index 9d34ffad20..5499b1ff36 100644
--- a/src/tool_getparam.c
+++ b/src/tool_getparam.c
@@ -1719,8 +1719,7 @@ static ParameterError parse_upload_flags(struct OperationConfig *config,
}
/* if 'toggle' is TRUE, set the 'bits' in 'modify'.
- if 'toggle' is FALSE, clear the 'bits' in 'modify'
-*/
+ if 'toggle' is FALSE, clear the 'bits' in 'modify' */
static void togglebit(bool toggle, unsigned long *modify, unsigned long bits)
{
if(toggle)
diff --git a/src/tool_helpers.c b/src/tool_helpers.c
index a23c3a80e7..b5e9b54121 100644
--- a/src/tool_helpers.c
+++ b/src/tool_helpers.c
@@ -29,8 +29,8 @@
#include "tool_helpers.h"
/*
-** Helper functions that are used from more than one source file.
-*/
+ * Helper functions that are used from more than one source file.
+ */
const char *param2text(ParameterError error)
{
diff --git a/src/tool_main.c b/src/tool_main.c
index 4ed2f41d58..d017f70257 100644
--- a/src/tool_main.c
+++ b/src/tool_main.c
@@ -129,8 +129,8 @@ static void memory_tracking_init(void)
#endif
/*
-** curl tool main function.
-*/
+ * curl tool main function.
+ */
#ifdef _UNICODE
#ifdef CURL_HAVE_DIAG
/* GCC does not know about wmain() */
diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c
index 18e2d1a625..57a49ef97f 100644
--- a/src/tool_paramhlp.c
+++ b/src/tool_paramhlp.c
@@ -64,8 +64,7 @@ struct getout *new_getout(struct OperationConfig *config)
countcrlf TRUE - return number of bytes from the start that are ONLY CR or
LF or NULL.
-
-*/
+ */
static size_t memcrlf(char *orig,
bool countcrlf, /* TRUE if we count CRLF, FALSE
if we count non-CRLF */
diff --git a/src/tool_progress.c b/src/tool_progress.c
index 2f15e8f6ae..c30644c0e3 100644
--- a/src/tool_progress.c
+++ b/src/tool_progress.c
@@ -30,8 +30,8 @@
but never longer than 5 columns (+ one zero byte).
Add suffix k, M, G when suitable...
- Unit test @1622
-*/
+ Unit test 1622
+ */
UNITTEST char *max5data(curl_off_t bytes, char *max5, size_t mlen)
{
/* a signed 64-bit value is 8192 petabytes maximum */
@@ -90,7 +90,7 @@ int xferinfo_cb(void *clientp,
/* Provide a time string that is 8 letters long (plus the zero byte)
- Unit test @1622
+ Unit test 1622
*/
UNITTEST void timebuf(char *r, size_t rlen, curl_off_t seconds)
{
@@ -152,9 +152,9 @@ static void add_offt(curl_off_t *val, curl_off_t add)
}
/*
- |DL% UL% Dled Uled Xfers Live Total Current Left Speed
- | 6 -- 9.9G 0 2 2 0:00:40 0:00:02 0:00:37 4087M
-*/
+ |DL% UL% Dled Uled Xfers Live Total Current Left Speed
+ | 6 -- 9.9G 0 2 2 0:00:40 0:00:02 0:00:37 4087M
+ */
bool progress_meter(CURLM *multi, struct curltime *start, bool final)
{
static struct curltime stamp;
diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c
index 92bf9c43a5..c4b1124370 100644
--- a/src/tool_urlglob.c
+++ b/src/tool_urlglob.c
@@ -425,8 +425,7 @@ static CURLcode add_glob(struct URLGlob *glob, size_t pos)
}
/* returns the named glob pattern (case sensitively) if it exists, otherwise
- NULL
-*/
+ NULL */
static struct URLPattern *glob_find_name(struct URLGlob *glob,
struct Curl_str *name)
{
diff --git a/src/tool_writeout.c b/src/tool_writeout.c
index ac8d5434b8..63e93ff52d 100644
--- a/src/tool_writeout.c
+++ b/src/tool_writeout.c
@@ -569,7 +569,7 @@ static const char *outtime(const char *ptr, /* %time{ ... */
- +0000 for %z because it is otherwise not portable
- UTC for %Z because it is otherwise not portable
- Keep '%%' as-is so that strftime() makes a single % out of them
- */
+ */
for(i = 0; !result && i < vlen; i++) {
if((i < vlen - 1) && ptr[i] == '%') {
switch(ptr[i + 1]) {
diff --git a/src/tool_writeout_json.c b/src/tool_writeout_json.c
index 7ea18860a5..3b6f7df73f 100644
--- a/src/tool_writeout_json.c
+++ b/src/tool_writeout_json.c
@@ -32,8 +32,7 @@
/* provide the given string in dynbuf as a quoted json string, but without the
outer quotes. The buffer is not inited by this function.
- Return 0 on success, non-zero on error.
-*/
+ Return 0 on success, non-zero on error. */
int jsonquoted(const char *in, size_t len, struct dynbuf *out, bool lowercase)
{
const unsigned char *i = (const unsigned char *)in;
diff --git a/tests/libtest/lib1156.c b/tests/libtest/lib1156.c
index b8339c2456..6b13374f04 100644
--- a/tests/libtest/lib1156.c
+++ b/tests/libtest/lib1156.c
@@ -23,16 +23,14 @@
***************************************************************************/
#include "first.h"
-/*
- Check range/resume returned error codes and data presence.
+/* Check range/resume returned error codes and data presence.
- The input parameters are:
- - CURLOPT_RANGE/CURLOPT_RESUME_FROM
- - CURLOPT_FAILONERROR
- - Returned http code (2xx/416)
- - Content-Range header present in reply.
-
-*/
+ The input parameters are:
+ - CURLOPT_RANGE/CURLOPT_RESUME_FROM
+ - CURLOPT_FAILONERROR
+ - Returned http code (2xx/416)
+ - Content-Range header present in reply.
+ */
#define F_RESUME (1 << 0) /* resume/range. */
#define F_HTTP416 (1 << 1) /* Server returns http code 416. */
diff --git a/tests/libtest/lib1560.c b/tests/libtest/lib1560.c
index fd8073c876..0b20780b7e 100644
--- a/tests/libtest/lib1560.c
+++ b/tests/libtest/lib1560.c
@@ -300,12 +300,11 @@ static const struct testcase get_parts_list[] = {
"| [16] | [17]",
0, CURLU_URLDECODE, CURLUE_OK },
#ifdef USE_IDN
- /*
- https://sv.wikipedia.org/wiki/R%c3%a4ksm%c3%b6rg%c3%a5s
- https://codepoints.net/U+00E4 Latin Small Letter A with Diaeresis
- https://codepoints.net/U+00F6 Latin Small Letter O with Diaeresis
- https://codepoints.net/U+00E5 Latin Small Letter A with Ring Above
- */
+ /* https://sv.wikipedia.org/wiki/R%c3%a4ksm%c3%b6rg%c3%a5s
+ https://codepoints.net/U+00E4 Latin Small Letter A with Diaeresis
+ https://codepoints.net/U+00F6 Latin Small Letter O with Diaeresis
+ https://codepoints.net/U+00E5 Latin Small Letter A with Ring Above
+ */
{ "https://r\xc3\xa4ksm\xc3\xb6rg\xc3\xa5s.se",
"https | [11] | [12] | [13] | xn--rksmrgs-5wao1o.se | "
"[15] | / | [16] | [17]", 0, CURLU_PUNYCODE, CURLUE_OK },
@@ -323,15 +322,14 @@ static const struct testcase get_parts_list[] = {
"https | [11] | [12] | [13] | [30] | [15] | / | [16] | [17]",
0, CURLU_PUNYCODE, CURLUE_OK },
#endif
- /*
- https://codepoints.net/U+2102 Double-Struck Capital C
- https://codepoints.net/U+1d64 Latin Subscript Small Letter U
- https://codepoints.net/U+24c7 Circled Latin Capital Letter R
- https://codepoints.net/U+2112 Script Capital L
- https://codepoints.net/U+3002 Ideographic Full Stop
- https://codepoints.net/U+1d412 Mathematical Bold Capital S
- https://codepoints.net/U+1f134 Squared Latin Capital Letter E
- */
+ /* https://codepoints.net/U+2102 Double-Struck Capital C
+ https://codepoints.net/U+1d64 Latin Subscript Small Letter U
+ https://codepoints.net/U+24c7 Circled Latin Capital Letter R
+ https://codepoints.net/U+2112 Script Capital L
+ https://codepoints.net/U+3002 Ideographic Full Stop
+ https://codepoints.net/U+1d412 Mathematical Bold Capital S
+ https://codepoints.net/U+1f134 Squared Latin Capital Letter E
+ */
{"https://"
"%e2%84%82%e1%b5%a4%e2%93%87%e2%84%92%e3%80%82%f0%9d%90%92%f0%9f%84%b4",
"https | [11] | [12] | [13] | "
@@ -1132,7 +1130,7 @@ static int checkurl(const char *org, const char *url, const char *out)
/* 1. Set the URL
2. Set components
3. Extract all components (not URL)
-*/
+ */
static const struct setgetcase setget_parts_list[] = {
{"https://example.com/",
"query=\"\",",
@@ -1748,7 +1746,7 @@ static int set_url(void)
/* 1. Set a URL
2. Set one or more parts
3. Extract and compare all parts - not the URL
-*/
+ */
static int setget_parts(bool has_utf8)
{
int i;
diff --git a/tests/libtest/lib1978.c b/tests/libtest/lib1978.c
index 5a6a44a048..e98ce3ca81 100644
--- a/tests/libtest/lib1978.c
+++ b/tests/libtest/lib1978.c
@@ -59,7 +59,7 @@ static CURLcode test_lib1978(const char *URL)
same value
7. merging works for headers all with no values
8. merging works for headers some with no values
- */
+ */
list = curl_slist_append(list, "x-amz-meta-test: test2");
if(!list)
diff --git a/tests/libtest/lib514.c b/tests/libtest/lib514.c
index 1fe9adc8d5..fb4b7e2385 100644
--- a/tests/libtest/lib514.c
+++ b/tests/libtest/lib514.c
@@ -45,12 +45,10 @@ static CURLcode test_lib514(const char *URL)
/* Based on a bug report by Niels van Tongeren on June 29, 2004:
- A weird situation occurs when request 1 is a POST request and the request
- 2 is a HEAD request. For the POST request we set the CURLOPT_POSTFIELDS,
- CURLOPT_POSTFIELDSIZE and CURLOPT_POST options. For the HEAD request we
- set the CURLOPT_NOBODY option to '1'.
-
- */
+ A weird situation occurs when request 1 is a POST request and the request
+ 2 is a HEAD request. For the POST request we set the CURLOPT_POSTFIELDS,
+ CURLOPT_POSTFIELDSIZE and CURLOPT_POST options. For the HEAD request we
+ set the CURLOPT_NOBODY option to '1'. */
easy_setopt(curl, CURLOPT_POSTFIELDS, "moo");
easy_setopt(curl, CURLOPT_POSTFIELDSIZE, 3L);
diff --git a/tests/libtest/lib590.c b/tests/libtest/lib590.c
index 3a83e62701..88614c9c3f 100644
--- a/tests/libtest/lib590.c
+++ b/tests/libtest/lib590.c
@@ -23,19 +23,18 @@
***************************************************************************/
#include "first.h"
-/*
- Based on a bug report recipe by Rene Bernhardt in
- https://curl.se/mail/lib-2011-10/0323.html
+/* Based on a bug report recipe by Rene Bernhardt in
+ https://curl.se/mail/lib-2011-10/0323.html
- It is reproducible by the following steps:
+ It is reproducible by the following steps:
- - Use a proxy that offers NTLM and Negotiate
- (CURLOPT_PROXY and CURLOPT_PROXYPORT)
- - Tell libcurl NOT to use Negotiate
- curl_easy_setopt(CURLOPT_PROXYAUTH,
- CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM)
- - Start the request
-*/
+ - Use a proxy that offers NTLM and Negotiate
+ (CURLOPT_PROXY and CURLOPT_PROXYPORT)
+ - Tell libcurl NOT to use Negotiate
+ curl_easy_setopt(CURLOPT_PROXYAUTH,
+ CURLAUTH_BASIC | CURLAUTH_DIGEST | CURLAUTH_NTLM)
+ - Start the request
+ */
static CURLcode test_lib590(const char *URL)
{
diff --git a/tests/server/dnsd.c b/tests/server/dnsd.c
index 87f32384ee..a9b869d771 100644
--- a/tests/server/dnsd.c
+++ b/tests/server/dnsd.c
@@ -424,22 +424,22 @@ create_resp(int qid, const struct sockaddr *addr, curl_socklen_t addrlen,
uint8_t header[12] = {
0x80, 0xea, /* ID, overwrite */
0x81, 0x80,
- /*
- Flags: 0x8180 Standard query response, No error
- 1... .... .... .... = Response: Message is a response
- .000 0... .... .... = Opcode: Standard query (0)
- .... .0.. .... .... = Authoritative: Server is not an authority for
- domain
- .... ..0. .... .... = Truncated: Message is not truncated
- .... ...1 .... .... = Recursion desired: Do query recursively
- .... .... 1... .... = Recursion available: Server can do recursive
- queries
- .... .... .0.. .... = Z: reserved (0)
- .... .... ..0. .... = Answer authenticated: Answer/authority portion
- was not authenticated by the server
- .... .... ...0 .... = Non-authenticated data: Unacceptable
- .... .... .... 0000 = Reply code: No error (0)
- */
+ /* Flags: 0x8180 Standard query response, No error
+
+ 1... .... .... .... = Response: Message is a response
+ .000 0... .... .... = Opcode: Standard query (0)
+ .... .0.. .... .... = Authoritative: Server is not an authority for
+ domain
+ .... ..0. .... .... = Truncated: Message is not truncated
+ .... ...1 .... .... = Recursion desired: Do query recursively
+ .... .... 1... .... = Recursion available: Server can do recursive
+ queries
+ .... .... .0.. .... = Z: reserved (0)
+ .... .... ..0. .... = Answer authenticated: Answer/authority portion
+ was not authenticated by the server
+ .... .... ...0 .... = Non-authenticated data: Unacceptable
+ .... .... .... 0000 = Reply code: No error (0)
+ */
0x0, 0x1, /* QDCOUNT a single question */
0x0, 0x0, /* ANCOUNT number of answers */
0x0, 0x0, /* NSCOUNT */
diff --git a/tests/server/mqttd.c b/tests/server/mqttd.c
index 286495a63e..189ac41bec 100644
--- a/tests/server/mqttd.c
+++ b/tests/server/mqttd.c
@@ -286,7 +286,7 @@ static int disconnect(FILE *dump, curl_socket_t fd)
}
/*
- do
+ do
encodedByte = X MOD 128
X = X DIV 128
@@ -294,16 +294,13 @@ static int disconnect(FILE *dump, curl_socket_t fd)
// if there are more data to encode, set the top bit of this byte
if ( X > 0 )
-
encodedByte = encodedByte OR 128
+ endif
- endif
+ 'output' encodedByte
- 'output' encodedByte
-
- while ( X > 0 )
-
-*/
+ while ( X > 0 )
+ */
/* return number of bytes used */
static size_t encode_length(size_t packetlen,
@@ -684,12 +681,10 @@ end:
return CURL_SOCKET_BAD;
}
-/*
- sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
+/* sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
- if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
- accept()
-*/
+ if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
+ accept() */
static bool mqttd_incoming(curl_socket_t listenfd)
{
fd_set fds_read;
diff --git a/tests/server/sockfilt.c b/tests/server/sockfilt.c
index d25195af2d..32838f987c 100644
--- a/tests/server/sockfilt.c
+++ b/tests/server/sockfilt.c
@@ -911,12 +911,10 @@ static bool disc_handshake(void)
return TRUE;
}
-/*
- sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
+/* sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
- if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
- accept()
-*/
+ if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
+ accept() */
static bool juggle(curl_socket_t *sockfdp,
curl_socket_t listenfd,
enum sockmode *mode)
@@ -1041,7 +1039,7 @@ static bool juggle(curl_socket_t *sockfdp,
Commands:
DATA - plain pass-through data
- */
+ */
if(!read_stdin(buffer, 5))
return FALSE;
diff --git a/tests/server/socksd.c b/tests/server/socksd.c
index 9e1caedc2d..b0b5b6771c 100644
--- a/tests/server/socksd.c
+++ b/tests/server/socksd.c
@@ -167,7 +167,7 @@ static void socksd_getconfig(void)
o 0x00 NO AUTHENTICATION REQUIRED
o 0x01 GSSAPI
o 0x02 USERNAME/PASSWORD
- */
+ */
else if(!strcmp(key, "method")) {
pval = value;
if(!curlx_str_number(&pval, &num, 0xff)) {
@@ -366,7 +366,7 @@ static curl_socket_t sockit(curl_socket_t fd)
+----+------+----------+------+----------+
| 1 | 1 | 1 to 255 | 1 | 1 to 255 |
+----+------+----------+------+----------+
- */
+ */
unsigned char ulen;
unsigned char plen;
bool login = TRUE;
@@ -438,10 +438,10 @@ static curl_socket_t sockit(curl_socket_t fd)
return CURL_SOCKET_BAD;
}
/* ATYP:
- o IPv4 address: 0x01
- o domain name: 0x03
- o IPv6 address: 0x04
- */
+ o IPv4 address: 0x01
+ o domain name: 0x03
+ o IPv6 address: 0x04
+ */
type = buffer[SOCKS5_ATYP];
address = &buffer[SOCKS5_DSTADDR];
switch(type) {
@@ -518,19 +518,18 @@ static curl_socket_t sockit(curl_socket_t fd)
response[SOCKS5_VERSION] = s_config.responseversion;
- /*
- o REP Reply field:
- o 0x00 succeeded
- o 0x01 general SOCKS server failure
- o 0x02 connection not allowed by ruleset
- o 0x03 Network unreachable
- o 0x04 Host unreachable
- o 0x05 Connection refused
- o 0x06 TTL expired
- o 0x07 Command not supported
- o 0x08 Address type not supported
- o 0x09 to 0xFF unassigned
- */
+ /* o REP Reply field:
+ o 0x00 succeeded
+ o 0x01 general SOCKS server failure
+ o 0x02 connection not allowed by ruleset
+ o 0x03 Network unreachable
+ o 0x04 Host unreachable
+ o 0x05 Connection refused
+ o 0x06 TTL expired
+ o 0x07 Command not supported
+ o 0x08 Address type not supported
+ o 0x09 to 0xFF unassigned
+ */
response[SOCKS5_REP] = rep;
response[SOCKS5_RESERVED] = 0; /* must be zero */
response[SOCKS5_ATYP] = type; /* address type */
@@ -602,12 +601,10 @@ static int tunnel(struct perclient *cp, fd_set *fds)
return 0;
}
-/*
- sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
+/* sockfdp is a pointer to an established stream or CURL_SOCKET_BAD
- if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
- accept()
-*/
+ if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must
+ accept() */
static bool socksd_incoming(curl_socket_t listenfd)
{
fd_set fds_read;
diff --git a/tests/unit/unit1609.c b/tests/unit/unit1609.c
index 1132a1a7cf..d7970a5cc6 100644
--- a/tests/unit/unit1609.c
+++ b/tests/unit/unit1609.c
@@ -35,36 +35,36 @@ static CURLcode t1609_setup(void)
/* CURLOPT_RESOLVE address parsing test - to test the following defect fix:
- 1. if there is already existing host:port pair in the DNS cache and
- we call CURLOPT_RESOLVE, it should also replace addresses.
- for example, if there is "test.com:80" with address "1.1.1.1"
- and we called CURLOPT_RESOLVE with address "2.2.2.2", then DNS entry
- needs to reflect that.
+ 1. if there is already existing host:port pair in the DNS cache and
+ we call CURLOPT_RESOLVE, it should also replace addresses.
+ for example, if there is "test.com:80" with address "1.1.1.1"
+ and we called CURLOPT_RESOLVE with address "2.2.2.2", then DNS entry
+ needs to reflect that.
- 2. when cached address is already there and close to expire, then by the
- time request is made, it can get expired. This happens because, when
- we set address using CURLOPT_RESOLVE,
- it usually marks as permanent (by setting timestamp to zero). However,
- if address already exists in the cache, then it does not mark it, but
- leaves it as it is.
- We are fixing this by setting timestamp to zero if address already
- exists too.
+ 2. when cached address is already there and close to expire, then by the
+ time request is made, it can get expired. This happens because, when
+ we set address using CURLOPT_RESOLVE,
+ it usually marks as permanent (by setting timestamp to zero). However,
+ if address already exists in the cache, then it does not mark it, but
+ leaves it as it is.
+ We are fixing this by setting timestamp to zero if address already
+ exists too.
- Test:
+ Test:
- - insert new entry
- - verify that timestamp is not zero
- - call set options with CURLOPT_RESOLVE
- - then, call Curl_loadhostpairs
+ - insert new entry
+ - verify that timestamp is not zero
+ - call set options with CURLOPT_RESOLVE
+ - then, call Curl_loadhostpairs
- expected result: cached address has zero timestamp.
+ expected result: cached address has zero timestamp.
- - call set options with CURLOPT_RESOLVE with same host:port pair,
- different address.
- - then, call Curl_loadhostpairs
+ - call set options with CURLOPT_RESOLVE with same host:port pair,
+ different address.
+ - then, call Curl_loadhostpairs
- expected result: cached address has zero timestamp and new address
-*/
+ expected result: cached address has zero timestamp and new address
+ */
static CURLcode test_unit1609(const char *arg)
{
diff --git a/tests/unit/unit1667.c b/tests/unit/unit1667.c
index 345bd052cf..5fedfd2b40 100644
--- a/tests/unit/unit1667.c
+++ b/tests/unit/unit1667.c
@@ -103,18 +103,17 @@ static CURLcode test_unit1667(const char *arg)
{ 31, "abcde", 5, "", CURLE_BAD_FUNCTION_ARGUMENT },
{ 99, "abcde", 5, "", CURLE_BAD_FUNCTION_ARGUMENT },
- /*
- (many different) strings:
+ /* (many different) strings:
- CURL_ASN1_UTF8_STRING
- CURL_ASN1_NUMERIC_STRING
- CURL_ASN1_PRINTABLE_STRING
- CURL_ASN1_TELETEX_STRING
- CURL_ASN1_IA5_STRING
- CURL_ASN1_VISIBLE_STRING
- CURL_ASN1_UNIVERSAL_STRING
- CURL_ASN1_BMP_STRING
- */
+ CURL_ASN1_UTF8_STRING
+ CURL_ASN1_NUMERIC_STRING
+ CURL_ASN1_PRINTABLE_STRING
+ CURL_ASN1_TELETEX_STRING
+ CURL_ASN1_IA5_STRING
+ CURL_ASN1_VISIBLE_STRING
+ CURL_ASN1_UNIVERSAL_STRING
+ CURL_ASN1_BMP_STRING
+ */
{ CURL_ASN1_UTF8_STRING, "abcde", 5, "abcde", CURLE_OK },
/* a with ring, a with umlaut, o with umlaut in UTF-8 encoding */
{ CURL_ASN1_UTF8_STRING, "\xc3\xa5\xc3\xa4\xc3\xb6", 6,