diff options
| author | Tom Rini <trini@konsulko.com> | 2023-08-23 11:03:46 -0400 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2023-08-23 11:03:46 -0400 |
| commit | 291055efee4e1ae4ad0b62393256514a4e76cb1e (patch) | |
| tree | ea07ae23b1458879483f1397cebc79a38c54897b /cmd | |
| parent | 58144e2839299351734719dd3b0081a7887ba5cb (diff) | |
| parent | 4e73b0153cce064e10dee4722cb2b6833361c227 (diff) | |
Merge tag 'doc-2023-10-rc4' of https://source.denx.de/u-boot/custodians/u-boot-efi
Pull request for doc-2023-10-rc4
Documentation:
* Fix documentation for TI boards
* Describe running on VirtualBox
* List build dependencies for building documenation
* Add references to U-Boot talks
Other:
* Fix error handling in the setexpr command (printf_str)
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/printf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/cmd/printf.c b/cmd/printf.c index e0246767431..0c6887e0d6e 100644 --- a/cmd/printf.c +++ b/cmd/printf.c @@ -144,10 +144,10 @@ static void printf_str(struct print_inf *inf, char *format, ...) i = vsnprintf(inf->str + inf->offset, remaining, format, args); va_end(args); - if (i >= remaining) - inf->error |= PRINT_TRUNCATED_ERROR; - else if (i < 0) + if (i < 0) inf->error |= PRINT_CONVERSION_ERROR; + else if ((unsigned int)i >= remaining) + inf->error |= PRINT_TRUNCATED_ERROR; else inf->offset += i; } |
