From 0469eafa3ec246fa6d061f5e3927c45fc13570d9 Mon Sep 17 00:00:00 2001 From: Donat Zenichev Date: Wed, 13 May 2026 12:31:28 +0200 Subject: [PATCH] MT#61856 call.h: make `packet_stream_last_packet()` inliner consistent With timestamps handling, which want to operate on signed integers. Return the signed max value given from the calls of `atomic64_get_na()`. Raw-cast the output of `atomic64_get_na()` to the signed integer as well. Change-Id: Icc6878c9b08545f456ad5eb267ed6a3333c11ab7 --- include/call.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/call.h b/include/call.h index c38968e45..6aa0a2639 100644 --- a/include/call.h +++ b/include/call.h @@ -464,8 +464,8 @@ struct packet_stream { }; INLINE int64_t packet_stream_last_packet(const struct packet_stream *ps) { - uint64_t lp1 = atomic64_get_na(&ps->last_packet_us); - uint64_t lp2 = atomic64_get_na(&ps->stats_in->last_packet_us); + int64_t lp1 = (int64_t)atomic64_get_na(&ps->last_packet_us); + int64_t lp2 = (int64_t)atomic64_get_na(&ps->stats_in->last_packet_us); return MAX(lp1, lp2); }