{
struct printf_info info;
va_list va;
- int ret;
va_start(va, fmt);
info.outstr = buf;
info.putc = putc_outstr;
- ret = _vprintf(&info, fmt, va);
+ _vprintf(&info, fmt, va);
va_end(va);
*info.outstr = '\0';
- return ret;
+ return info.outstr - buf;
}
#if CONFIG_IS_ENABLED(LOG)
int vsnprintf(char *buf, size_t size, const char *fmt, va_list va)
{
struct printf_info info;
- int ret;
info.outstr = buf;
info.putc = putc_outstr;
- ret = _vprintf(&info, fmt, va);
+ _vprintf(&info, fmt, va);
*info.outstr = '\0';
- return ret;
+ return info.outstr - buf;
}
#endif
{
struct printf_info info;
va_list va;
- int ret;
va_start(va, fmt);
info.outstr = buf;
info.putc = putc_outstr;
- ret = _vprintf(&info, fmt, va);
+ _vprintf(&info, fmt, va);
va_end(va);
*info.outstr = '\0';
- return ret;
+ return info.outstr - buf;
}
void print_grouped_ull(unsigned long long int_val, int digits)