mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-29 11:54:38 +01: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 <[email protected]> Reviewed-by: Mariusz Zaborski <[email protected]> Signed-off-by: Alexander Motin <[email protected]> Fixes #16853 Closes #17733
This commit is contained in:
1 parent
b5d41deca9
commit
41c6eaac8b
1 file changed
+2
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user