From 42dad89211f2d34f62c103a7647bd64e466a0215 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Fri, 16 Feb 2024 14:15:30 +0800 Subject: [PATCH] rpmsg/ping: Replace UINT_MAX with CLOCK_MAX since clock_t may map to either 32-bit or 64-bit integer type, UINT_MAX may not be the maximum value of clock_t. Signed-off-by: Xiang Xiao --- drivers/rpmsg/rpmsg_ping.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/rpmsg/rpmsg_ping.c b/drivers/rpmsg/rpmsg_ping.c index fb8e2e739e..883392a4a2 100644 --- a/drivers/rpmsg/rpmsg_ping.c +++ b/drivers/rpmsg/rpmsg_ping.c @@ -188,7 +188,7 @@ static void rpmsg_ping_logout_rate(uint64_t len, clock_t avg) int rpmsg_ping(FAR struct rpmsg_endpoint *ept, FAR const struct rpmsg_ping_s *ping) { - clock_t min = UINT_MAX; + clock_t min = CLOCK_MAX; clock_t max = 0; uint64_t total = 0; uint32_t buf_len = 0;