From bde687bac0d2a1e7c876797f8e502a829962c2af Mon Sep 17 00:00:00 2001 From: Abdelatif Guettouche Date: Thu, 17 Jun 2021 00:07:54 +0100 Subject: [PATCH] examples/elf: Drop the 0x when printing pointers. Signed-off-by: Abdelatif Guettouche --- examples/elf/tests/hello/hello.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/elf/tests/hello/hello.c b/examples/elf/tests/hello/hello.c index dc5f392b3..41b3cfcb8 100644 --- a/examples/elf/tests/hello/hello.c +++ b/examples/elf/tests/hello/hello.c @@ -42,14 +42,14 @@ int main(int argc, char **argv) /* Print arguments */ printf("argc\t= %d\n", argc); - printf("argv\t= 0x%p\n", argv); + printf("argv\t= %p\n", argv); for (i = 0; i < argc; i++) { printf("argv[%d]\t= ", i); if (argv[i]) { - printf("(0x%p) \"%s\"\n", argv[i], argv[i]); + printf("(%p) \"%s\"\n", argv[i], argv[i]); } else { @@ -57,7 +57,7 @@ int main(int argc, char **argv) } } - printf("argv[%d]\t= 0x%p\n", argc, argv[argc]); + printf("argv[%d]\t= %p\n", argc, argv[argc]); printf("Goodbye, world!\n"); return 0; }