aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/memdebug.c2
-rw-r--r--lib/memdebug.h6
2 files changed, 3 insertions, 5 deletions
diff --git a/lib/memdebug.c b/lib/memdebug.c
index 9617faf13..1a0a485a8 100644
--- a/lib/memdebug.c
+++ b/lib/memdebug.c
@@ -119,7 +119,7 @@ static long memsize = 0; /* set number of mallocs allowed */
void curl_memdebug(const char *logname)
{
if(!logfile) {
- if(logname)
+ if(logname && *logname)
logfile = fopen(logname, "w");
else
logfile = stderr;
diff --git a/lib/memdebug.h b/lib/memdebug.h
index b18bb39da..02df08877 100644
--- a/lib/memdebug.h
+++ b/lib/memdebug.h
@@ -32,14 +32,12 @@
#include <curl/curl.h>
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
+#define CURL_MT_LOGFNAME_BUFSIZE 512
+
#define logfile curl_debuglogfile
extern FILE *logfile;