mirror of
https://github.com/curl/curl.git
synced 2026-07-16 01:17:16 +03:00
memdebug.h: eliminate global macro CURL_MT_LOGFNAME_BUFSIZE
It had a single use in `src/tool_main.c`. Replace with a literal and
`sizeof()`s.
Follow-up to aaab5fa299
Cherry-picked from #17827
Closes #17833
This commit is contained in:
parent
26f3ee25a4
commit
05263820e5
2 changed files with 3 additions and 5 deletions
|
|
@ -56,8 +56,6 @@
|
|||
# define ALLOC_SIZE2(n, s)
|
||||
#endif
|
||||
|
||||
#define CURL_MT_LOGFNAME_BUFSIZE 512
|
||||
|
||||
/* Avoid redundant redeclaration warnings with modern compilers, when including
|
||||
this header multiple times. */
|
||||
#ifndef HEADER_CURL_MEMDEBUG_H_EXTERNS
|
||||
|
|
|
|||
|
|
@ -116,9 +116,9 @@ static void memory_tracking_init(void)
|
|||
env = curl_getenv("CURL_MEMDEBUG");
|
||||
if(env) {
|
||||
/* use the value as filename */
|
||||
char fname[CURL_MT_LOGFNAME_BUFSIZE];
|
||||
if(strlen(env) >= CURL_MT_LOGFNAME_BUFSIZE)
|
||||
env[CURL_MT_LOGFNAME_BUFSIZE-1] = '\0';
|
||||
char fname[512];
|
||||
if(strlen(env) >= sizeof(fname))
|
||||
env[sizeof(fname)-1] = '\0';
|
||||
strcpy(fname, env);
|
||||
curl_free(env);
|
||||
curl_dbg_memdebug(fname);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue