summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Rapoport <rppt@linux.ibm.com>2020-05-25 22:00:49 +0300
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2020-05-27 06:52:13 -0700
commitd2bc577d779ff2a62ec6c8e148d3206e48c53414 (patch)
tree33b8b8844d12948cff04b464590cdfe7d969f741
parentd9c9ae5ecf135518935099ceab105956d80910f7 (diff)
downloadsecret-memory-preloader-d2bc577d779ff2a62ec6c8e148d3206e48c53414.tar.gz
Use %zu for size_t format in printf
Signed-off-by: Mike Rapoport <rppt@linux.ibm.com>
-rw-r--r--preload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/preload.c b/preload.c
index 55c9979..41caa65 100644
--- a/preload.c
+++ b/preload.c
@@ -170,7 +170,7 @@ static void show_segment(void)
for (i = 0, seg = m.seg; seg != NULL; i++, seg = seg->next) {
printf("SHOW SEGMENT %i\n", i);
for (c = (struct malloc_chunk *)seg->base; c != NULL; c = next_chunk(c)) {
- printf("%p:%d:%d:%04x:%04x", c, in_use(c), prev_in_use(c),
+ printf("%p:%d:%d:%zu:%zu", c, in_use(c), prev_in_use(c),
c->h.prev_foot, chunk_size(c));
if (!in_use(c))
printf(":%p:%p", c->fd, c->bk);
@@ -227,7 +227,7 @@ static void alloc_segment(void)
c = next_chunk(c);
c->h.head = (size_t)(((char *)p + SEG_SIZE) - (char *)c) | PINUSE_BIT;
c->h.prev_foot = ssize;
- DEBUG("next chunk at 0x%p, head=%x, prev=%x\n", c, chunk_size(c), c->h.prev_foot);
+ DEBUG("next chunk at 0x%p, head=%zu, prev=%zu\n", c, chunk_size(c), c->h.prev_foot);
link_free_chunk(c);
}