From: Viktor Szakats Date: Mon, 23 Jun 2025 14:53:33 +0000 (+0200) Subject: tidy-up: replace `` with `"memdebug.h"` (src, units) X-Git-Tag: rc-8_15_0-2~37 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c4f94870897a49fb150954ce88a5c78105d7163f;p=thirdparty%2Fcurl.git tidy-up: replace `` with `"memdebug.h"` (src, units) Closes #17722 --- diff --git a/src/slist_wc.c b/src/slist_wc.c index 41c944d94b..7f1e8f19be 100644 --- a/src/slist_wc.c +++ b/src/slist_wc.c @@ -29,7 +29,7 @@ #include "slist_wc.h" /* The last #include files should be: */ -#include +#include "memdebug.h" /* * slist_wc_append() appends a string to the linked list. This function can be diff --git a/src/terminal.c b/src/terminal.c index ccd5bbf62a..0150cd4a56 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -28,7 +28,7 @@ #endif #include "terminal.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef HAVE_TERMIOS_H # include diff --git a/src/tool_bname.c b/src/tool_bname.c index 62dbcf2ed5..4ba1a3b8ee 100644 --- a/src/tool_bname.c +++ b/src/tool_bname.c @@ -25,7 +25,7 @@ #include "tool_bname.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifndef HAVE_BASENAME diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c index b9504f5825..220ac576db 100644 --- a/src/tool_cb_dbg.c +++ b/src/tool_cb_dbg.c @@ -28,7 +28,7 @@ #include "tool_cb_dbg.h" #include "tool_util.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ static void dump(const char *timebuf, const char *idsbuf, const char *text, FILE *stream, const unsigned char *ptr, size_t size, diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c index 41d8b80d76..e27ec0adf7 100644 --- a/src/tool_cb_hdr.c +++ b/src/tool_cb_hdr.c @@ -35,7 +35,7 @@ #include "tool_operate.h" #include "tool_libinfo.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ static char *parse_filename(const char *ptr, size_t len); diff --git a/src/tool_cb_prg.c b/src/tool_cb_prg.c index e4e3a709a0..c6ee6b2822 100644 --- a/src/tool_cb_prg.c +++ b/src/tool_cb_prg.c @@ -29,7 +29,7 @@ #include "tool_operate.h" #include "terminal.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #define MAX_BARLENGTH 400 #define MIN_BARLENGTH 20 diff --git a/src/tool_cb_rea.c b/src/tool_cb_rea.c index eb2717f71f..18b8d7b47a 100644 --- a/src/tool_cb_rea.c +++ b/src/tool_cb_rea.c @@ -33,7 +33,7 @@ #include "tool_util.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* ** callback for CURLOPT_READFUNCTION diff --git a/src/tool_cb_see.c b/src/tool_cb_see.c index ca6091f86b..68899c5829 100644 --- a/src/tool_cb_see.c +++ b/src/tool_cb_see.c @@ -27,7 +27,7 @@ #include "tool_operate.h" #include "tool_cb_see.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* ** callback for CURLOPT_SEEKFUNCTION diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c index 8f39cae102..9babd54cf7 100644 --- a/src/tool_cb_wrt.c +++ b/src/tool_cb_wrt.c @@ -35,7 +35,7 @@ #include "tool_cb_wrt.h" #include "tool_operate.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef _WIN32 #define OPENMODE S_IREAD | S_IWRITE diff --git a/src/tool_cfgable.c b/src/tool_cfgable.c index 0d2b80a1a7..f3839b90b6 100644 --- a/src/tool_cfgable.c +++ b/src/tool_cfgable.c @@ -27,7 +27,7 @@ #include "tool_formparse.h" #include "tool_paramhlp.h" #include "tool_main.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ void config_init(struct OperationConfig *config) { diff --git a/src/tool_dirhie.c b/src/tool_dirhie.c index 6d0dac01c3..de4bdcef64 100644 --- a/src/tool_dirhie.c +++ b/src/tool_dirhie.c @@ -32,7 +32,7 @@ #include "tool_dirhie.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #if defined(_WIN32) || (defined(MSDOS) && !defined(__DJGPP__)) # define mkdir(x,y) (mkdir)((x)) diff --git a/src/tool_doswin.c b/src/tool_doswin.c index 58508603f1..07a85bc111 100644 --- a/src/tool_doswin.c +++ b/src/tool_doswin.c @@ -40,7 +40,7 @@ #include "tool_doswin.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef _WIN32 # undef PATH_MAX diff --git a/src/tool_easysrc.c b/src/tool_easysrc.c index 432e614d1c..9092bd9f34 100644 --- a/src/tool_easysrc.c +++ b/src/tool_easysrc.c @@ -31,7 +31,7 @@ #include "tool_easysrc.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* global variable definitions, for easy-interface source code generation */ diff --git a/src/tool_findfile.c b/src/tool_findfile.c index 20d2c0bd93..4b09d0f708 100644 --- a/src/tool_findfile.c +++ b/src/tool_findfile.c @@ -39,7 +39,7 @@ #include "tool_findfile.h" #include "tool_cfgable.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ struct finder { const char *env; diff --git a/src/tool_formparse.c b/src/tool_formparse.c index b3a12edf2b..d656a7ae6d 100644 --- a/src/tool_formparse.c +++ b/src/tool_formparse.c @@ -29,7 +29,7 @@ #include "tool_paramhlp.h" #include "tool_formparse.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* tool_mime functions. */ static struct tool_mime *tool_mime_new(struct tool_mime *parent, diff --git a/src/tool_getparam.c b/src/tool_getparam.c index f453d90b03..0770c4000d 100644 --- a/src/tool_getparam.c +++ b/src/tool_getparam.c @@ -38,7 +38,7 @@ #include "tool_help.h" #include "var.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #define ALLOW_BLANK TRUE #define DENY_BLANK FALSE diff --git a/src/tool_getpass.c b/src/tool_getpass.c index bb0692083d..eea46fb526 100644 --- a/src/tool_getpass.c +++ b/src/tool_getpass.c @@ -55,7 +55,7 @@ #endif #include "tool_getpass.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef __VMS /* VMS implementation */ diff --git a/src/tool_help.c b/src/tool_help.c index 3ccb15ab72..3cdd522c29 100644 --- a/src/tool_help.c +++ b/src/tool_help.c @@ -33,7 +33,7 @@ #include "tool_cfgable.h" #include "terminal.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ struct category_descriptors { const char *opt; diff --git a/src/tool_helpers.c b/src/tool_helpers.c index 7a9ccb4d35..ec56712086 100644 --- a/src/tool_helpers.c +++ b/src/tool_helpers.c @@ -27,7 +27,7 @@ #include "tool_msgs.h" #include "tool_getparam.h" #include "tool_helpers.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* ** Helper functions that are used from more than one source file. diff --git a/src/tool_ipfs.c b/src/tool_ipfs.c index b96a7e4dd6..06c45cb572 100644 --- a/src/tool_ipfs.c +++ b/src/tool_ipfs.c @@ -28,7 +28,7 @@ #include "tool_cfgable.h" #include "tool_msgs.h" #include "tool_ipfs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* ensure input ends in slash */ static CURLcode ensure_trailing_slash(char **input) diff --git a/src/tool_libinfo.c b/src/tool_libinfo.c index a1888c00a2..d755532652 100644 --- a/src/tool_libinfo.c +++ b/src/tool_libinfo.c @@ -24,7 +24,7 @@ #include "tool_setup.h" #include "tool_libinfo.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* global variable definitions, for libcurl runtime info */ diff --git a/src/tool_main.c b/src/tool_main.c index 5f453a32d7..6c994d971f 100644 --- a/src/tool_main.c +++ b/src/tool_main.c @@ -51,7 +51,7 @@ * the library level code from this client-side is ugly, but we do this * anyway for convenience. */ -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef __VMS /* diff --git a/src/tool_msgs.c b/src/tool_msgs.c index 026c77a465..ffd0945f76 100644 --- a/src/tool_msgs.c +++ b/src/tool_msgs.c @@ -28,7 +28,7 @@ #include "tool_cb_prg.h" #include "terminal.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #define WARN_PREFIX "Warning: " #define NOTE_PREFIX "Note: " diff --git a/src/tool_operate.c b/src/tool_operate.c index 3fbe85ee3b..bd25e99c40 100644 --- a/src/tool_operate.c +++ b/src/tool_operate.c @@ -94,7 +94,7 @@ CURL_EXTERN CURLcode curl_easy_perform_ev(CURL *easy); #endif -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef CURL_CA_EMBED #ifndef CURL_DECLARED_CURL_CA_EMBED diff --git a/src/tool_operhlp.c b/src/tool_operhlp.c index a9571e881f..93904bbe16 100644 --- a/src/tool_operhlp.c +++ b/src/tool_operhlp.c @@ -28,7 +28,7 @@ #include "tool_doswin.h" #include "tool_operhlp.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ void clean_getout(struct OperationConfig *config) { diff --git a/src/tool_paramhlp.c b/src/tool_paramhlp.c index 5b819a7413..74d338b779 100644 --- a/src/tool_paramhlp.c +++ b/src/tool_paramhlp.c @@ -32,7 +32,7 @@ #include "tool_util.h" #include "tool_version.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ struct getout *new_getout(struct OperationConfig *config) { diff --git a/src/tool_parsecfg.c b/src/tool_parsecfg.c index defadc0da0..d9dfd55b50 100644 --- a/src/tool_parsecfg.c +++ b/src/tool_parsecfg.c @@ -30,7 +30,7 @@ #include "tool_msgs.h" #include "tool_parsecfg.h" #include "tool_util.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* only acknowledge colon or equals as separators if the option was not specified with an initial dash! */ diff --git a/src/tool_setopt.c b/src/tool_setopt.c index f29183425c..4d31a6f891 100644 --- a/src/tool_setopt.c +++ b/src/tool_setopt.c @@ -29,7 +29,7 @@ #include "tool_easysrc.h" #include "tool_setopt.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ /* Lookup tables for converting setopt values back to symbols */ /* For enums, values may be in any order. */ diff --git a/src/tool_stderr.c b/src/tool_stderr.c index 1285f04a8e..602da613a0 100644 --- a/src/tool_stderr.c +++ b/src/tool_stderr.c @@ -26,7 +26,7 @@ #include "tool_stderr.h" #include "tool_msgs.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ FILE *tool_stderr; diff --git a/src/tool_urlglob.c b/src/tool_urlglob.c index 40d69a4b66..29c4119cd7 100644 --- a/src/tool_urlglob.c +++ b/src/tool_urlglob.c @@ -27,7 +27,7 @@ #include "tool_doswin.h" #include "tool_urlglob.h" #include "tool_vms.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #define GLOBERROR(string, column, code) \ glob->error = string, glob->pos = column, code diff --git a/src/tool_util.c b/src/tool_util.c index e6188cecb0..e7ab704f12 100644 --- a/src/tool_util.c +++ b/src/tool_util.c @@ -24,7 +24,7 @@ #include "tool_setup.h" #include "tool_util.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef _WIN32 diff --git a/src/tool_vms.c b/src/tool_vms.c index ecf01eb5b2..143b2f0d53 100644 --- a/src/tool_vms.c +++ b/src/tool_vms.c @@ -32,7 +32,7 @@ #include "curlmsg_vms.h" #include "tool_vms.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ void decc$__posix_exit(int __status); void decc$exit(int __status); diff --git a/src/tool_writeout.c b/src/tool_writeout.c index 9036c14044..d348714299 100644 --- a/src/tool_writeout.c +++ b/src/tool_writeout.c @@ -26,7 +26,7 @@ #include "tool_cfgable.h" #include "tool_writeout.h" #include "tool_writeout_json.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ static int writeTime(FILE *stream, const struct writeoutvar *wovar, struct per_transfer *per, CURLcode per_result, diff --git a/src/tool_xattr.c b/src/tool_xattr.c index ee35d4d464..346c805a40 100644 --- a/src/tool_xattr.c +++ b/src/tool_xattr.c @@ -24,7 +24,7 @@ #include "tool_setup.h" #include "tool_xattr.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #ifdef USE_XATTR diff --git a/src/var.c b/src/var.c index 01ea03918e..b2fc835fbd 100644 --- a/src/var.c +++ b/src/var.c @@ -32,7 +32,7 @@ #include "tool_paramhlp.h" #include "tool_writeout_json.h" #include "var.h" -#include /* keep this as LAST include */ +#include "memdebug.h" /* keep this as LAST include */ #define MAX_EXPAND_CONTENT 10000000 #define MAX_VAR_LEN 128 /* max length of a name */ diff --git a/tests/unit/unit1602.c b/tests/unit/unit1602.c index 126cf8d806..0bd2bbc511 100644 --- a/tests/unit/unit1602.c +++ b/tests/unit/unit1602.c @@ -25,7 +25,7 @@ #include "hash.h" -#include /* LAST include file */ +#include "memdebug.h" /* LAST include file */ static void t1602_mydtor(void *p) { diff --git a/tests/unit/unit1603.c b/tests/unit/unit1603.c index c3f99b6ca2..054b718999 100644 --- a/tests/unit/unit1603.c +++ b/tests/unit/unit1603.c @@ -25,7 +25,7 @@ #include "hash.h" -#include /* LAST include file */ +#include "memdebug.h" /* LAST include file */ static const size_t slots = 3; diff --git a/tests/unit/unit1616.c b/tests/unit/unit1616.c index 8040809a3e..5d03c274e7 100644 --- a/tests/unit/unit1616.c +++ b/tests/unit/unit1616.c @@ -25,7 +25,7 @@ #include "uint-hash.h" -#include /* LAST include file */ +#include "memdebug.h" /* LAST include file */ static void t1616_mydtor(unsigned int id, void *elem) {