diff options
| author | Tom Rini <[email protected]> | 2024-10-03 11:52:42 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-10-03 11:52:42 -0600 |
| commit | 0d28900dd171d3444ea16d9cc18af35a90c03e27 (patch) | |
| tree | 246e8a9bb1b15c7c2791f6a8b60e6420bcf35216 /lib/tiny-printf.c | |
| parent | 08990e2254ffd63ade7f633b78b6573abc9b7e90 (diff) | |
| parent | fe38b88453d2ed40e1009d22f3f4d4213d2016b7 (diff) | |
Merge patch series "vbe: Series part D"
Simon Glass <[email protected]> says:
This includes various patches towards implementing the VBE abrec
bootmeth in U-Boot.
Diffstat (limited to 'lib/tiny-printf.c')
| -rw-r--r-- | lib/tiny-printf.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 9a70c6095b3..64dee779c4a 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -365,16 +365,15 @@ int sprintf(char *buf, const char *fmt, ...) { 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) @@ -382,14 +381,13 @@ int sprintf(char *buf, const char *fmt, ...) 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 @@ -398,16 +396,15 @@ int snprintf(char *buf, size_t size, const char *fmt, ...) { 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) |
