mirror of
https://github.com/linux-can/can-utils.git
synced 2026-11-04 15:31:10 +01:00
isobusfs: fix printf format specifiers in log messages
Several log messages used format specifiers which did not match the types of the provided arguments (e.g. %d or %i for size_t/ssize_t, %ld for int64_t/time_t and size_t for the '.*' precision). On 64 bit hosts (and for int64_t/time_t on 32 bit hosts) this leads to wrong output or undefined behaviour when the log level is enabled. Additionally the seek response position was compared to the requested offset without le32toh() conversion which fails on big endian hosts. Fix the format specifiers and add the missing le32toh() conversion. Assisted-by: Claude:claude-opus-5-5 Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
This commit is contained in:
@@ -97,7 +97,7 @@ int isobusfs_srv_fss_send(struct isobusfs_srv_priv *priv)
|
||||
}
|
||||
|
||||
if (time_diff < -ISOBUSFS_CM_F_FS_STATUS_RATE_JITTER) {
|
||||
pr_warn("too late to send next fs status message: %ld ms",
|
||||
pr_warn("too late to send next fs status message: %" PRId64 " ms",
|
||||
time_diff);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user