libs/libc/stdio: using sprintf to instead itoa

itoa isn't posix function, the standard stdlib file exclude it.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
dongjiuzhu1 2024-06-03 17:28:23 +08:00 committed by Xiang Xiao
parent 88da2b4adb
commit 47eec633a0

View file

@ -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);
}