Use correct inttypes.h format specifier

The type here is uint32_t which should use PRIx32, not plain %x which is
for an int, we've just gotten away with it so far.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
David Gibson 2019-11-07 17:46:43 +01:00
parent 7150286225
commit 6ce585ac15

3
util.c
View file

@ -13,6 +13,7 @@
#include <stdarg.h>
#include <string.h>
#include <assert.h>
#include <inttypes.h>
#include <errno.h>
#include <fcntl.h>
@ -393,7 +394,7 @@ void utilfdt_print_data(const char *data, int len)
printf(" = <");
for (i = 0, len /= 4; i < len; i++)
printf("0x%08x%s", fdt32_to_cpu(cell[i]),
printf("0x%08" PRIx32 "%s", fdt32_to_cpu(cell[i]),
i < (len - 1) ? " " : "");
printf(">");
} else {