mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-01-15 01:32:04 +03:00
Fix type in dbrrd_closest()
For ABS() to work, the argument must be signed, but rrdd_time is uint64_t. Clang noticed it. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com> Signed-off-by: Alexander Motin <alexander.motin@TrueNAS.com> Fixes #16853 Closes #17733
This commit is contained in:
parent
b5d41deca9
commit
41c6eaac8b
@ -208,7 +208,8 @@ dbrrd_closest(hrtime_t tv, const rrd_data_t *r1, const rrd_data_t *r2)
|
||||
if (r2 == NULL)
|
||||
return (r1);
|
||||
|
||||
return (ABS(tv - r1->rrdd_time) < ABS(tv - r2->rrdd_time) ? r1 : r2);
|
||||
return (ABS(tv - (hrtime_t)r1->rrdd_time) <
|
||||
ABS(tv - (hrtime_t)r2->rrdd_time) ? r1 : r2);
|
||||
}
|
||||
|
||||
uint64_t
|
||||
|
||||
Loading…
Reference in New Issue
Block a user