From adde77da575c39ee07e99b80f663142f3a0ac6d9 Mon Sep 17 00:00:00 2001 From: shatty Date: Sun, 21 Nov 2004 02:01:39 +0000 Subject: [PATCH] suppress "mem_list leaks" messages when the number of objects is zero git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10074 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/tools/rc/compile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tools/rc/compile.cpp b/src/tools/rc/compile.cpp index d434b89e08..0e239f1021 100644 --- a/src/tools/rc/compile.cpp +++ b/src/tools/rc/compile.cpp @@ -119,7 +119,9 @@ void free_mem(void* ptr) static void clean_up_mem() { #ifdef DEBUG - printf("mem_list leaks %ld objects\n", mem_list.size()); + if (mem_list.size() != 0) { + printf("mem_list leaks %ld objects\n", mem_list.size()); + } for (mem_iter_t i = mem_list.begin(); i != mem_list.end(); ) { printf("%p allocated at %s:%ld\n", i->ptr, i->file, i->line);