Skip to content
Commit 09e2bd70 authored by Stephanos Ioannidis's avatar Stephanos Ioannidis Committed by Andrzej Puzdrowski
Browse files

boot_serial: Fix incorrect format specifier for off_t



The `BOOT_LOG_INF` function, which uses the format specifiers defined
by the C standard, was incorrectly printing a variable with the type of
`off_t` using the `%x` format specifier, which is intended to be used
with the `int` type.

The `off_t` type, specified by the POSIX standard, is not guaranteed to
be `int`, and it may be defined as `long` or `long long` depending on
the toolchain and the target architecture.

This commit updates the print routine such that it casts the arguments
of the `off_t` type to `intmax_t` and prints them out using the
corresponding `%jx` format specifier.

Signed-off-by: default avatarStephanos Ioannidis <root@stephanos.io>
parent b4c04d33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment