mirror of
git://sourceware.org/git/lvm2.git
synced 2025-02-25 21:57:45 +03:00
size_ts aren't really pointers but there are no format specifiers for them,
so this will just have to do.
This commit is contained in:
parent
f96175e75e
commit
afe46c849b
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user