summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Caulfield <pcaulfie@redhat.com>2001-11-16 11:37:45 +0000
committerPatrick Caulfield <pcaulfie@redhat.com>2001-11-16 11:37:45 +0000
commit0ec52dddce8f6a30c97c63976251fefdced99356 (patch)
treec4885d26488b554a598bdd9443760d8bd6798b6f
parentc289355a3a12a6e75984d4877e536e46d0c9b0b3 (diff)
downloadlvm2-0ec52dddce8f6a30c97c63976251fefdced99356.tar.gz
size_ts aren't really pointers but there are no format specifiers for them,
so this will just have to do.
-rw-r--r--lib/mm/dbg_malloc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mm/dbg_malloc.c b/lib/mm/dbg_malloc.c
index a186d06e6..a279ed43b 100644
--- a/lib/mm/dbg_malloc.c
+++ b/lib/mm/dbg_malloc.c
@@ -8,6 +8,7 @@
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
+#include <inttypes.h>
#include "dbg_malloc.h"
#include "log.h"
@@ -36,7 +37,7 @@ void *malloc_aux(size_t s, const char *file, int line)
size_t tsize = s + sizeof(*nb) + sizeof(unsigned long);
if (!(nb = malloc(tsize))) {
- log_error("couldn't allocate any memory, size = %lu", s);
+ log_error("couldn't allocate any memory, size = %" PRIuPTR, s);
return 0;
}
@@ -159,7 +160,7 @@ int dump_memory(void)
for (mb = _head; mb; mb = mb->next) {
print_log(_LOG_INFO, mb->file, mb->line,
- "block %d at %p, size %ld",
+ "block %d at %p, size %" PRIdPTR,
mb->id, mb->magic, mb->length);
tot += mb->length;
}