]> sourceware.org Git - lvm2.git/commitdiff
Compile code for memory debuging only with DEBUG_MEM
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 28 Jan 2011 16:01:32 +0000 (16:01 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 28 Jan 2011 16:01:32 +0000 (16:01 +0000)
When it's not in use - do not compile this code.
Improves lcov code coverage results for this code a lot :)

libdm/mm/dbg_malloc.c

index db7f5f3ed77b21ffbfa34deffc9f38521edce036..5f06d1e277afc7accf31b46d12fe3e064712a815 100644 (file)
@@ -15,6 +15,8 @@
 
 #include "dmlib.h"
 
+#ifdef DEBUG_MEM
+
 #include <assert.h>
 #include <stdarg.h>
 
@@ -249,6 +251,8 @@ void dm_bounds_check_debug(void)
        }
 }
 
+#endif
+
 void *dm_malloc_aux(size_t s, const char *file __attribute__((unused)),
                    int line __attribute__((unused)))
 {
This page took 0.039798 seconds and 5 git commands to generate.