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 <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
master
Andre Przywara 8 years ago committed by Jagan Teki
parent a28e1d9831
commit 1c853629d9
  1. 3
      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;

Loading…
Cancel
Save