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
pull/2118/head
Donat Zenichev 2 months ago
parent 4bce6bd411
commit 0469eafa3e

@ -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);
}

Loading…
Cancel
Save