Skip to content
Snippets Groups Projects
Commit 3191d840 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

tiny-printf: Correct the snprintf() implementation


This current code passes the variable arguments list to sprintf(). This is
not correct. Fix it by calling _vprintf() directly.

This makes firefly-rk3288 boot again.

Fixes: abeb272d ("tiny-printf: Support snprintf()")
Reviewed-by: default avatarStefan Roese <sr@denx.de>
Acked-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarSimon Glass <sjg@chromium.org>
parent 9c2f9b2d
No related branches found
No related tags found
No related merge requests found
......@@ -168,8 +168,10 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
int ret;
va_start(va, fmt);
ret = sprintf(buf, fmt, va);
outstr = buf;
ret = _vprintf(fmt, va, putc_outstr);
va_end(va);
*outstr = '\0';
return ret;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment