mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-16 18:04:48 +00:00
lib: Suppress E when writing error-string output
When CONFIG_ERRNO_STR is not enabled this shows a spurious 'E' from the
format string. Fix this.
Fixes: 7f33194132
("lib: Support printing an error string")
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
4c4ccc5a04
commit
3a3543db51
1 changed files with 3 additions and 2 deletions
|
@ -680,8 +680,10 @@ repeat:
|
|||
break;
|
||||
|
||||
case 'd':
|
||||
if (fmt[1] == 'E')
|
||||
if (fmt[1] == 'E') {
|
||||
flags |= ERRSTR;
|
||||
fmt++;
|
||||
}
|
||||
/* fallthrough */
|
||||
case 'i':
|
||||
flags |= SIGN;
|
||||
|
@ -725,7 +727,6 @@ repeat:
|
|||
ADDCH(str, ' ');
|
||||
for (p = errno_str(num); *p; p++)
|
||||
ADDCH(str, *p);
|
||||
fmt++;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue