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/nuttx.git

commit 47eec633a0bc6e474e08af781c814d778519a1bc
Author: dongjiuzhu1 <[email protected]>
AuthorDate: Mon Jun 3 17:28:23 2024 +0800

    libs/libc/stdio: using sprintf to instead itoa
    
    itoa isn't posix function, the standard stdlib file exclude it.
    
    Signed-off-by: dongjiuzhu1 <[email protected]>
---
 libs/libc/stdio/lib_libbsprintf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libs/libc/stdio/lib_libbsprintf.c 
b/libs/libc/stdio/lib_libbsprintf.c
index 53ef74a936..2acd27e652 100644
--- a/libs/libc/stdio/lib_libbsprintf.c
+++ b/libs/libc/stdio/lib_libbsprintf.c
@@ -164,7 +164,7 @@ int lib_bsprintf(FAR struct lib_outstream_s *s, FAR const 
IPTR char *fmt,
         }
       else if (c == '*')
         {
-          itoa(var->i, fmtstr + len - 1, 10);
+          sprintf(fmtstr + len - 1, "%d", var->i);
           len = strlen(fmtstr);
           offset += sizeof(var->i);
         }

Reply via email to