]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
Cleaner traces
authorDale Weiler <killfieldengine@gmail.com>
Thu, 17 Oct 2013 08:23:53 +0000 (04:23 -0400)
committerDale Weiler <killfieldengine@gmail.com>
Thu, 17 Oct 2013 08:23:53 +0000 (04:23 -0400)
stat.c

diff --git a/stat.c b/stat.c
index a66bf37e8b0fe657e6ad28f0500203272c4a0a84..e46102da51d3ec8e337cfb49217615be63af7f56 100644 (file)
--- a/stat.c
+++ b/stat.c
@@ -299,7 +299,7 @@ char *stat_mem_strdup(const char *src, size_t line, const char *file, bool empty
         return NULL;
 
     len = strlen(src);
-    if (((!empty) ? len : true) && (ptr = (char*)stat_mem_allocate(len + 1, line, file, NULL))) {
+    if (((!empty) ? len : true) && (ptr = (char*)stat_mem_allocate(len + 1, line, file, "strdup"))) {
         memcpy(ptr, src, len);
         ptr[len] = '\0';
     }
@@ -721,7 +721,7 @@ static void stat_dump_mem_leaks(void) {
     for (info = stat_mem_block_root; info; info = info->next) {
         /* we need access to the block */
         VALGRIND_MAKE_MEM_DEFINED(info, sizeof(stat_mem_block_t));
-        con_out("lost: %u (bytes) at %s:%u %s\n",
+        con_out("lost: %u (bytes) at %s:%u from expression `%s`\n",
             info->size,
             info->file,
             info->line,