1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 05:12:57 +01:00

tests/malloc: remove 0x prefix for %p in printf

This commit is contained in:
Gunar Schorcht 2023-01-31 21:14:28 +01:00
parent fd47a1b7e4
commit 99e07a6786

View File

@ -59,7 +59,7 @@ static uint32_t fill_memory(struct node *head)
total = 0;
while (head && (head->ptr = malloc(CHUNK_SIZE)) && total < MAX_MEM) {
printf("Allocated %"PRIu32" Bytes at 0x%p, total %"PRIu32"\n",
printf("Allocated %"PRIu32" Bytes at %p, total %"PRIu32"\n",
(uint32_t)CHUNK_SIZE, head->ptr, total += CHUNK_SIZE);
memset(head->ptr, '@', CHUNK_SIZE);
head = head->next = malloc(sizeof(struct node));
@ -88,7 +88,7 @@ static void free_memory(struct node *head)
total -= CHUNK_SIZE;
freed++;
}
printf("Free %"PRIu32" Bytes at 0x%p, total %"PRIu32"\n",
printf("Free %"PRIu32" Bytes at %p, total %"PRIu32"\n",
(uint32_t)CHUNK_SIZE, head->ptr, total);
free(head->ptr);
}