From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andre Przywara Date: Mon, 19 Dec 2016 01:49:55 +0000 Subject: [U-Boot] [PATCH v3 05/26] SPL: tiny-printf: ignore "-" modifier In-Reply-To: <1482112216-12983-1-git-send-email-andre.przywara@arm.com> References: <1482112216-12983-1-git-send-email-andre.przywara@arm.com> Message-ID: <1482112216-12983-6-git-send-email-andre.przywara@arm.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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 --- lib/tiny-printf.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/tiny-printf.c b/lib/tiny-printf.c index 0b8512f..dfa8432 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; -- 2.8.2