Revert "Update to 7.44.0"
[platform/upstream/curl.git] / tests / libtest / testtrace.c
index 5cb5fec..c977d21 100644 (file)
@@ -22,6 +22,9 @@
 
 #include "test.h"
 
+#define _MPRINTF_REPLACE /* use our functions only */
+#include <curl/mprintf.h>
+
 #include "testutil.h"
 #include "testtrace.h"
 #include "memdebug.h"
@@ -91,11 +94,13 @@ int libtest_debug_cb(CURL *handle, curl_infotype type,
   struct timeval tv;
   struct tm *now;
   char timebuf[20];
+  char *timestr;
   time_t secs;
 
   (void)handle;
 
   timebuf[0] = '\0';
+  timestr = &timebuf[0];
 
   if(trace_cfg->tracetime) {
     tv = tutil_tvnow();
@@ -111,7 +116,7 @@ int libtest_debug_cb(CURL *handle, curl_infotype type,
 
   switch (type) {
   case CURLINFO_TEXT:
-    fprintf(stderr, "%s== Info: %s", &timebuf[0], data);
+    fprintf(stderr, "%s== Info: %s", timestr, (char *)data);
   default: /* in case a new one is introduced to shock us */
     return 0;