Re: [PATCH 3/3] tools/accounting: simplify 32-bit time_t overflow check in format_timespec()

From: xu.xin16

Date: Sat Jul 18 2026 - 09:28:51 EST


> From: Wang Yaxin <wang.yaxin@xxxxxxxxxx>
>
> Replace the Y2038 overflow guard in format_timespec() with a direct
> narrowing truncation check ((long long)time_sec != ts->tv_sec), which
> is both simpler and more robust across platforms. Also move the
> time_sec assignment earlier to avoid duplication.
>
> While at it, fix a minor alignment issue in delaytop.c by adding a
> leading space to the output format string.
>
> Signed-off-by: Wang Yaxin <wang.yaxin@xxxxxxxxxx>

Acked-by: Xu Xin <xu.xin16@xxxxxxxxxx>