From: Andre Przywara Date: Mon, 2 Jan 2017 11:48:29 +0000 (+0000) Subject: SPL: tiny-printf: ignore "-" modifier X-Git-Tag: v2017.03-rc1~164^2~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1c853629d936f88d7d41bdd01a3bd8c55391e754;p=oweals%2Fu-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;