You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/06/17 02:21:48 UTC

[incubator-nuttx-apps] 02/02: examples/elf: Drop the 0x when printing pointers.

This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit bde687bac0d2a1e7c876797f8e502a829962c2af
Author: Abdelatif Guettouche <ab...@espressif.com>
AuthorDate: Thu Jun 17 00:07:54 2021 +0100

    examples/elf: Drop the 0x when printing pointers.
    
    Signed-off-by: Abdelatif Guettouche <ab...@espressif.com>
---
 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 dc5f392..41b3cfc 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;
 }