From ccba492024a478ce6e12a10973872a627e3a7f90 Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Thu, 26 Feb 2026 03:13:56 +0100 Subject: [PATCH] tidy-up: miscellaneous Closes #20851 --- .clang-tidy.yml | 2 +- CMakeLists.txt | 1 + appveyor.sh | 4 +-- configure.ac | 4 +-- docs/internals/LLIST.md | 24 +++++++------- docs/libcurl/curl_easy_getinfo.md | 2 +- docs/libcurl/curl_easy_header.md | 12 +++---- docs/libcurl/curl_easy_pause.md | 2 +- docs/libcurl/curl_pushheader_bynum.md | 8 ++--- .../opts/CURLOPT_CHUNK_BGN_FUNCTION.md | 2 +- docs/libcurl/opts/CURLOPT_CHUNK_DATA.md | 2 +- .../opts/CURLOPT_CHUNK_END_FUNCTION.md | 2 +- .../opts/CURLOPT_OPENSOCKETFUNCTION.md | 2 +- docs/tests/CI.md | 2 +- lib/cf-socket.c | 4 +-- lib/cookie.c | 2 +- lib/curlx/version_win32.c | 2 +- lib/doh.h | 16 +++++----- lib/md4.c | 2 +- lib/md5.c | 2 +- lib/parsedate.c | 8 ++--- lib/sha256.c | 6 ++-- lib/urldata.h | 4 +-- lib/vquic/curl_ngtcp2.c | 3 +- scripts/mk-ca-bundle.pl | 4 +-- src/Makefile.am | 2 +- tests/libtest/lib560.c | 4 +-- tests/libtest/mk-lib1521.pl | 32 +++++++++---------- tests/server/getpart.c | 18 +++++------ tests/server/rtspd.c | 18 +++++------ tests/server/sws.c | 14 ++++---- tests/server/util.c | 8 ++--- tests/test1119.pl | 2 +- tests/unit/unit1398.c | 4 +-- tests/unit/unit2604.c | 4 +-- tests/unit/unit2605.c | 4 +-- 36 files changed, 114 insertions(+), 118 deletions(-) diff --git a/.clang-tidy.yml b/.clang-tidy.yml index b22fdc6a4f..3b3be699de 100644 --- a/.clang-tidy.yml +++ b/.clang-tidy.yml @@ -45,4 +45,4 @@ Checks: CheckOptions: misc-header-include-cycle.IgnoredFilesList: 'curl/curl.h' -HeaderFilterRegex: '.*' +HeaderFilterRegex: '.*' # Default in v22.1.0+ diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d67eaa1d6..1eb64a9cd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2356,6 +2356,7 @@ if(NOT CURL_DISABLE_INSTALL) # TARGETS_EXPORT_NAME # CURL_SUPPORTED_FEATURES_LIST # CURL_SUPPORTED_PROTOCOLS_LIST + # CURL_USE_PKGCONFIG # HAVE_BROTLI # HAVE_GSSAPI # HAVE_LIBIDN2 diff --git a/appveyor.sh b/appveyor.sh index 284a90f222..03d7e42642 100644 --- a/appveyor.sh +++ b/appveyor.sh @@ -49,9 +49,9 @@ if [ -n "${CMAKE_GENERATOR:-}" ]; then # Install custom cmake version if [ -n "${CMAKE_VERSION:-}" ]; then - cmake_ver=$(printf '%02d%02d' \ + cmake_ver="$(printf '%02d%02d' \ "$(echo "${CMAKE_VERSION}" | cut -f1 -d.)" \ - "$(echo "${CMAKE_VERSION}" | cut -f2 -d.)") + "$(echo "${CMAKE_VERSION}" | cut -f2 -d.)")" if [ "${cmake_ver}" -ge '0320' ]; then fn="cmake-${CMAKE_VERSION}-windows-x86_64" else diff --git a/configure.ac b/configure.ac index f924054c67..0a8c1ceb2e 100644 --- a/configure.ac +++ b/configure.ac @@ -485,7 +485,7 @@ Select from these: --with-amissl --with-gnutls --with-mbedtls - --with-openssl (also works for BoringSSL and LibreSSL) + --with-openssl (also works for AWS-LC, BoringSSL and LibreSSL) --with-rustls --with-schannel --with-wolfssl @@ -2047,8 +2047,8 @@ if test "$USE_WIN32_CRYPTO" = "1" || test "$SCHANNEL_ENABLED" = "1"; then LIBS="-ladvapi32 -lcrypt32 $LIBS" fi -dnl link bcrypt for BCryptGenRandom() (used when building for Vista or newer) if test "$curl_cv_native_windows" = "yes"; then + dnl for BCryptGenRandom() LIBS="-lbcrypt $LIBS" fi diff --git a/docs/internals/LLIST.md b/docs/internals/LLIST.md index fadc9f1a3d..b77e86598f 100644 --- a/docs/internals/LLIST.md +++ b/docs/internals/LLIST.md @@ -47,9 +47,9 @@ Example: to add a `struct foobar` to a linked list. Add a node struct within it: struct foobar { - char *random; - struct Curl_llist_node storage; /* can be anywhere in the struct */ - char *data; + char *random; + struct Curl_llist_node storage; /* can be anywhere in the struct */ + char *data; }; struct Curl_llist barlist; /* the list for foobar entries */ @@ -77,18 +77,18 @@ To iterate over a list: first get the head entry and then iterate over the nodes as long there is a next. Each node has an *element* associated with it, the custom pointer you stored there. Usually a struct pointer or similar. - struct Curl_llist_node *iter; + struct Curl_llist_node *iter; - /* get the first entry of the 'barlist' */ - iter = Curl_llist_head(&barlist); + /* get the first entry of the 'barlist' */ + iter = Curl_llist_head(&barlist); - while(iter) { - /* extract the element pointer from the node */ - struct foobar *elem = Curl_node_elem(iter); + while(iter) { + /* extract the element pointer from the node */ + struct foobar *elem = Curl_node_elem(iter); - /* advance to the next node in the list */ - iter = Curl_node_next(iter); - } + /* advance to the next node in the list */ + iter = Curl_node_next(iter); + } # Function overview diff --git a/docs/libcurl/curl_easy_getinfo.md b/docs/libcurl/curl_easy_getinfo.md index 9adf085d10..8b0d69df88 100644 --- a/docs/libcurl/curl_easy_getinfo.md +++ b/docs/libcurl/curl_easy_getinfo.md @@ -20,7 +20,7 @@ curl_easy_getinfo - extract information from a curl handle ~~~c #include -CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... ); +CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); ~~~ # DESCRIPTION diff --git a/docs/libcurl/curl_easy_header.md b/docs/libcurl/curl_easy_header.md index d4ac893810..bdab170708 100644 --- a/docs/libcurl/curl_easy_header.md +++ b/docs/libcurl/curl_easy_header.md @@ -81,12 +81,12 @@ the time it is called. ~~~c struct curl_header { - char *name; - char *value; - size_t amount; - size_t index; - unsigned int origin; - void *anchor; + char *name; + char *value; + size_t amount; + size_t index; + unsigned int origin; + void *anchor; }; ~~~ diff --git a/docs/libcurl/curl_easy_pause.md b/docs/libcurl/curl_easy_pause.md index f00fd28061..f80abd5523 100644 --- a/docs/libcurl/curl_easy_pause.md +++ b/docs/libcurl/curl_easy_pause.md @@ -21,7 +21,7 @@ curl_easy_pause - pause and unpause a connection ~~~c #include -CURLcode curl_easy_pause(CURL *handle, int bitmask ); +CURLcode curl_easy_pause(CURL *handle, int bitmask); ~~~ # DESCRIPTION diff --git a/docs/libcurl/curl_pushheader_bynum.md b/docs/libcurl/curl_pushheader_bynum.md index 2431ff446b..429710f001 100644 --- a/docs/libcurl/curl_pushheader_bynum.md +++ b/docs/libcurl/curl_pushheader_bynum.md @@ -51,10 +51,10 @@ static int push_cb(CURL *parent, int i = 0; char *field; do { - field = curl_pushheader_bynum(headers, i); - if(field) - fprintf(stderr, "Push header: %s\n", field); - i++; + field = curl_pushheader_bynum(headers, i); + if(field) + fprintf(stderr, "Push header: %s\n", field); + i++; } while(field); return CURL_PUSH_OK; /* permission granted */ } diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.md b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.md index 8d729ee88a..838b2e5a5f 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_CHUNK_BGN_FUNCTION.md @@ -92,7 +92,7 @@ NULL #include struct callback_data { - FILE *output; + FILE *output; }; static long file_is_coming(struct curl_fileinfo *finfo, diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.md b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.md index 9030cfeac3..fb1877e491 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_DATA.md +++ b/docs/libcurl/opts/CURLOPT_CHUNK_DATA.md @@ -42,7 +42,7 @@ NULL #include struct callback_data { - FILE *output; + FILE *output; }; static long file_is_coming(struct curl_fileinfo *finfo, diff --git a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.md b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.md index d95da58876..82bf9ad5ba 100644 --- a/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_CHUNK_END_FUNCTION.md @@ -50,7 +50,7 @@ NULL #include struct callback_data { - FILE *output; + FILE *output; }; static long file_is_downloaded(void *ptr) diff --git a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md index e08f53b8a7..568fb11b94 100644 --- a/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md +++ b/docs/libcurl/opts/CURLOPT_OPENSOCKETFUNCTION.md @@ -80,7 +80,7 @@ signal that it already is connected. The equivalent of this: ~~~c - return socket(addr->family, addr->socktype, addr->protocol); + return socket(addr->family, addr->socktype, addr->protocol); ~~~ # %PROTOCOLS% diff --git a/docs/tests/CI.md b/docs/tests/CI.md index bcd663c67b..e68c9bc885 100644 --- a/docs/tests/CI.md +++ b/docs/tests/CI.md @@ -64,7 +64,7 @@ GitHub Actions runs the following tests: - Tests with a variety of different compilation options, OSes, CPUs. - Fuzz tests ([see the curl-fuzzer repo for more info](https://github.com/curl/curl-fuzzer)). -- Static analysis and sanitizers: clang-tidy, scan-build, address sanitizer, +- Static analysis and sanitizers: clang-tidy, address sanitizer, memory sanitizer, thread sanitizer, CodeQL, valgrind, torture tests. These are each configured in different files in `.github/workflows`. diff --git a/lib/cf-socket.c b/lib/cf-socket.c index 4997b581bf..b921bcc04c 100644 --- a/lib/cf-socket.c +++ b/lib/cf-socket.c @@ -1281,7 +1281,7 @@ static CURLcode cf_tcp_connect(struct Curl_cfilter *cf, set_local_ip(cf, data); CURL_TRC_CF(data, cf, "local address %s port %d...", ctx->ip.local_ip, ctx->ip.local_port); - if(-1 == rc) { + if(rc == -1) { result = socket_connect_result(data, ctx->ip.remote_ip, error); goto out; } @@ -1801,7 +1801,7 @@ static CURLcode cf_udp_setup_quic(struct Curl_cfilter *cf, NOLINTNEXTLINE(clang-analyzer-unix.StdCLibraryFunctions) */ rc = connect(ctx->sock, &ctx->addr.curl_sa_addr, (curl_socklen_t)ctx->addr.addrlen); - if(-1 == rc) { + if(rc == -1) { return socket_connect_result(data, ctx->ip.remote_ip, SOCKERRNO); } ctx->sock_connected = TRUE; diff --git a/lib/cookie.c b/lib/cookie.c index bb8cff8b60..4d53cc460c 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -396,7 +396,7 @@ static CURLcode storecookie(struct Cookie *co, struct Curl_str *cp, /* No path was given in the header line, set the default */ const char *endslash = strrchr(path, '/'); if(endslash) - plen = (endslash - path + 1); /* include end slash */ + plen = endslash - path + 1; /* include end slash */ else plen = strlen(path); } diff --git a/lib/curlx/version_win32.c b/lib/curlx/version_win32.c index 2aa2641854..1229c39317 100644 --- a/lib/curlx/version_win32.c +++ b/lib/curlx/version_win32.c @@ -226,7 +226,7 @@ bool curlx_verify_windows_version(const unsigned int majorVersion, matched = !pRtlVerifyVersionInfo(&osver, dwTypeMask, cm); else matched = !!VerifyVersionInfoW((OSVERSIONINFOEXW *)&osver, - dwTypeMask, cm); + dwTypeMask, cm); } #endif diff --git a/lib/doh.h b/lib/doh.h index 0deafc7fde..3eba4df26e 100644 --- a/lib/doh.h +++ b/lib/doh.h @@ -29,14 +29,14 @@ typedef enum { DOH_OK, - DOH_DNS_BAD_LABEL, /* 1 */ - DOH_DNS_OUT_OF_RANGE, /* 2 */ - DOH_DNS_LABEL_LOOP, /* 3 */ - DOH_TOO_SMALL_BUFFER, /* 4 */ - DOH_OUT_OF_MEM, /* 5 */ - DOH_DNS_RDATA_LEN, /* 6 */ - DOH_DNS_MALFORMAT, /* 7 */ - DOH_DNS_BAD_RCODE, /* 8 - no such name */ + DOH_DNS_BAD_LABEL, /* 1 */ + DOH_DNS_OUT_OF_RANGE, /* 2 */ + DOH_DNS_LABEL_LOOP, /* 3 */ + DOH_TOO_SMALL_BUFFER, /* 4 */ + DOH_OUT_OF_MEM, /* 5 */ + DOH_DNS_RDATA_LEN, /* 6 */ + DOH_DNS_MALFORMAT, /* 7 */ + DOH_DNS_BAD_RCODE, /* 8 - no such name */ DOH_DNS_UNEXPECTED_TYPE, /* 9 */ DOH_DNS_UNEXPECTED_CLASS, /* 10 */ DOH_NO_CONTENT, /* 11 */ diff --git a/lib/md4.c b/lib/md4.c index cf18026484..1ac6ef1c5b 100644 --- a/lib/md4.c +++ b/lib/md4.c @@ -203,7 +203,7 @@ typedef struct md4_ctx MD4_CTX; * The MD4 transformation for all three rounds. */ #define MD4_STEP(f, a, b, c, d, x, s) \ - (a) += f((b), (c), (d)) + (x); \ + (a) += f(b, c, d) + (x); \ (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); /* diff --git a/lib/md5.c b/lib/md5.c index 72b59c97d2..c2bd176dc9 100644 --- a/lib/md5.c +++ b/lib/md5.c @@ -283,7 +283,7 @@ typedef struct md5_ctx my_md5_ctx; * The MD5 transformation for all four rounds. */ #define MD5_STEP(f, a, b, c, d, x, t, s) \ - (a) += f((b), (c), (d)) + (x) + (t); \ + (a) += f(b, c, d) + (x) + (t); \ (a) = (((a) << (s)) | (((a) & 0xffffffff) >> (32 - (s)))); \ (a) += (b); diff --git a/lib/parsedate.c b/lib/parsedate.c index 35c7c7af26..7efedec7d2 100644 --- a/lib/parsedate.c +++ b/lib/parsedate.c @@ -481,12 +481,12 @@ static int parsedate(const char *date, time_t *output) part++; } - if(-1 == secnum) + if(secnum == -1) secnum = minnum = hournum = 0; /* no time, make it zero */ - if((-1 == mdaynum) || - (-1 == monnum) || - (-1 == yearnum)) + if((mdaynum == -1) || + (monnum == -1) || + (yearnum == -1)) /* lacks vital info, fail */ return PARSEDATE_FAIL; diff --git a/lib/sha256.c b/lib/sha256.c index b438b2cc01..7b063659be 100644 --- a/lib/sha256.c +++ b/lib/sha256.c @@ -275,7 +275,7 @@ static const unsigned long K[64] = { #define Sha256_Ch(x, y, z) (z ^ (x & (y ^ z))) #define Sha256_Maj(x, y, z) (((x | y) & z) | (x & y)) -#define Sha256_S(x, n) RORc((x), (n)) +#define Sha256_S(x, n) RORc(x, n) #define Sha256_R(x, n) (((x) & 0xFFFFFFFFUL) >> (n)) #define Sigma0(x) (Sha256_S(x, 2) ^ Sha256_S(x, 13) ^ Sha256_S(x, 22)) @@ -416,7 +416,7 @@ static void my_sha256_final(unsigned char *out, void *ctx) */ if(md->curlen > 56) { while(md->curlen < 64) { - md->buf[md->curlen++] = (unsigned char)0; + md->buf[md->curlen++] = 0; } sha256_compress(md, md->buf); md->curlen = 0; @@ -424,7 +424,7 @@ static void my_sha256_final(unsigned char *out, void *ctx) /* Pad up to 56 bytes of zeroes */ while(md->curlen < 56) { - md->buf[md->curlen++] = (unsigned char)0; + md->buf[md->curlen++] = 0; } /* Store length */ diff --git a/lib/urldata.h b/lib/urldata.h index 23d8bbe74b..5ae148054b 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -74,7 +74,7 @@ #define CURLPROTO_WSS 0L #endif -#define CURLPROTO_MQTTS (1LL << 32) +#define CURLPROTO_MQTTS (1LL << 32) #define CURLPROTO_64ALL ((uint64_t)0xffffffffffffffff) @@ -87,7 +87,7 @@ typedef curl_off_t curl_prot_t; /* This mask is for all the old protocols that are provided and defined in the public header and shall exclude protocols added since which are not exposed in the API */ -#define CURLPROTO_MASK (0x3ffffff) +#define CURLPROTO_MASK 0x3ffffff #define CURL_DEFAULT_USER "anonymous" #define CURL_DEFAULT_PASSWORD "ftp@example.com" diff --git a/lib/vquic/curl_ngtcp2.c b/lib/vquic/curl_ngtcp2.c index 84ba839d47..48905d3e20 100644 --- a/lib/vquic/curl_ngtcp2.c +++ b/lib/vquic/curl_ngtcp2.c @@ -2063,8 +2063,7 @@ static CURLcode cf_progress_egress(struct Curl_cfilter *cf, pktcnt = 0; } else if(nread < gsolen) { - /* Reached MAX_PKT_BURST *or* - * the capacity of our buffer *or* + /* Reached capacity of our buffer *or* * last add was shorter than the previous ones, flush */ break; } diff --git a/scripts/mk-ca-bundle.pl b/scripts/mk-ca-bundle.pl index 79a5a90d32..9f0dbcd74e 100755 --- a/scripts/mk-ca-bundle.pl +++ b/scripts/mk-ca-bundle.pl @@ -382,7 +382,7 @@ if(!$filedate) { } # get the hash from the download file -my $newhash= sha256($txt); +my $newhash = sha256($txt); if(!$opt_f && $oldhash eq $newhash) { report "Downloaded file identical to previous run\'s source file. Exiting"; @@ -426,7 +426,7 @@ print CRT <offset - req->checkindex; } - /*** Init the httprequest structure properly for the upcoming request ***/ + /* Init the httprequest structure properly for the upcoming request */ req->checkindex = 0; req->offset = 0; @@ -640,7 +640,7 @@ static int rtspd_get_request(curl_socket_t sock, struct rtspd_httprequest *req) req->rtp_buffer = NULL; req->rtp_buffersize = 0; - /*** end of httprequest init ***/ + /* end of httprequest init */ while(!done_processing && (req->offset < sizeof(req->reqbuf) - 1)) { if(pipereq_length && pipereq) { @@ -1212,9 +1212,9 @@ static int test_rtspd(int argc, const char *argv[]) } /* - ** As soon as this server writes its pid file the test harness will - ** attempt to connect to this server and initiate its verification. - */ + * As soon as this server writes its pid file the test harness will + * attempt to connect to this server and initiate its verification. + */ wrotepidfile = write_pidfile(pidname); if(!wrotepidfile) @@ -1239,10 +1239,10 @@ static int test_rtspd(int argc, const char *argv[]) } /* - ** As soon as this server accepts a connection from the test harness it - ** must set the server logs advisor read lock to indicate that server - ** logs should not be read until this lock is removed by this server. - */ + * As soon as this server accepts a connection from the test harness it + * must set the server logs advisor read lock to indicate that server + * logs should not be read until this lock is removed by this server. + */ set_advisor_read_lock(loglockfile); serverlogslocked = 1; diff --git a/tests/server/sws.c b/tests/server/sws.c index 8d4b0b27da..c73a34c6a2 100644 --- a/tests/server/sws.c +++ b/tests/server/sws.c @@ -1855,10 +1855,10 @@ static curl_socket_t accept_connection(curl_socket_t sock) #endif /* - ** As soon as this server accepts a connection from the test harness it - ** must set the server logs advisor read lock to indicate that server - ** logs should not be read until this lock is removed by this server. - */ + * As soon as this server accepts a connection from the test harness it + * must set the server logs advisor read lock to indicate that server + * logs should not be read until this lock is removed by this server. + */ if(!serverlogslocked) set_advisor_read_lock(loglockfile); @@ -2275,9 +2275,9 @@ static int test_sws(int argc, const char *argv[]) #endif /* - ** As soon as this server writes its pid file the test harness will - ** attempt to connect to this server and initiate its verification. - */ + * As soon as this server writes its pid file the test harness will + * attempt to connect to this server and initiate its verification. + */ wrotepidfile = write_pidfile(pidname); if(!wrotepidfile) diff --git a/tests/server/util.c b/tests/server/util.c index ecaa2a448e..f792bd748e 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -254,10 +254,10 @@ void clear_advisor_read_lock(const char *filename) int res; /* - ** Log all removal failures. Even those due to file not existing. - ** This allows to detect if unexpectedly the file has already been - ** removed by a process different than the one that should do this. - */ + * Log all removal failures. Even those due to file not existing. + * This allows to detect if unexpectedly the file has already been + * removed by a process different than the one that should do this. + */ do { res = unlink(filename); diff --git a/tests/test1119.pl b/tests/test1119.pl index ffcb7cde93..cf17167d4b 100755 --- a/tests/test1119.pl +++ b/tests/test1119.pl @@ -171,7 +171,7 @@ for my $e (sort @syms) { # # CURL_TEMP_ - are defined and *undefined* again within the file # - # *_LAST and *_LASTENTRY are just prefix for the placeholders used for the + # *_LAST and *_LASTENTRY are just suffix for the placeholders used for the # last entry in many enum series. # diff --git a/tests/unit/unit1398.c b/tests/unit/unit1398.c index 7cab89facd..de9d539081 100644 --- a/tests/unit/unit1398.c +++ b/tests/unit/unit1398.c @@ -38,9 +38,7 @@ static CURLcode test_unit1398(const char *arg) int width = 3; char output[130]; -#if 0 -#define curl_msnprintf snprintf -#endif +/* #define curl_msnprintf snprintf */ /* without a trailing zero */ rc = curl_msnprintf(output, 4, "%.*s", width, buf); diff --git a/tests/unit/unit2604.c b/tests/unit/unit2604.c index 843886e7c8..d56f2e1ecd 100644 --- a/tests/unit/unit2604.c +++ b/tests/unit/unit2604.c @@ -94,12 +94,12 @@ static CURLcode test_unit2604(const char *arg) } if(!result) { if(cp && strcmp(cp, list[i].next)) { - curl_mprintf("... cp points to '%s', not '%s' as expected \n", + curl_mprintf("... cp points to '%s', not '%s' as expected\n", cp, list[i].next); unitfail++; } if(path && strcmp(path, list[i].expect)) { - curl_mprintf("... gave '%s', not '%s' as expected \n", + curl_mprintf("... gave '%s', not '%s' as expected\n", path, list[i].expect); unitfail++; } diff --git a/tests/unit/unit2605.c b/tests/unit/unit2605.c index 4673f0c1d5..0f6e8cb009 100644 --- a/tests/unit/unit2605.c +++ b/tests/unit/unit2605.c @@ -88,12 +88,12 @@ static CURLcode test_unit2605(const char *arg) } if(!result) { if(start != list[i].start) { - curl_mprintf("... start (%" FMT_OFF_T ") was not %" FMT_OFF_T " \n", + curl_mprintf("... start (%" FMT_OFF_T ") was not %" FMT_OFF_T "\n", start, list[i].start); unitfail++; } if(size != list[i].size) { - curl_mprintf("... size (%" FMT_OFF_T ") was not %" FMT_OFF_T " \n", + curl_mprintf("... size (%" FMT_OFF_T ") was not %" FMT_OFF_T "\n", size, list[i].size); unitfail++; }