From: Andre Przywara Date: Mon, 2 Jan 2017 11:48:29 +0000 (+0000) Subject: SPL: tiny-printf: ignore "-" modifier X-Git-Url: http://git.dujemihanovic.xyz/img/sics.gif?a=commitdiff_plain;h=1c853629d936f88d7d41bdd01a3bd8c55391e754;p=u-boot.git SPL: tiny-printf: ignore "-" modifier tiny-printf does not know about the "-" modifier, which aligns numbers. This is used by some SPL code, but as it's purely cosmetical, we just ignore this modifier here to avoid changing correct printf strings. Signed-off-by: Andre Przywara Reviewed-by: Simon Glass Reviewed-by: Jagan Teki --- diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 0b8512faf5..dfa843240f 100644 --- a/lib/tiny-printf.c +++ b/lib/tiny-printf.c @@ -69,6 +69,9 @@ int _vprintf(struct printf_info *info, const char *fmt, va_list va) bool islong = false; ch = *(fmt++); + if (ch == '-') + ch = *(fmt++); + if (ch == '0') { ch = *(fmt++); lz = 1;