mirror of
https://github.com/opnsense/src.git
synced 2026-06-03 13:58:30 -04:00
Fix implementation of ktime_add_ns() and ktime_sub_ns() in the LinuxKPI to
actually return the computed result instead of the input value. This is a regression issue after r289572. Found by: gcc6 MFC after: 3 days Sponsored by: Mellanox Technologies
This commit is contained in:
parent
f6ede6300f
commit
5b7cc89266
1 changed files with 2 additions and 6 deletions
|
|
@ -88,18 +88,14 @@ ktime_to_timeval(ktime_t kt)
|
|||
static inline ktime_t
|
||||
ktime_add_ns(ktime_t kt, int64_t ns)
|
||||
{
|
||||
ktime_t res;
|
||||
|
||||
res.tv64 = kt.tv64 + ns;
|
||||
kt.tv64 += ns;
|
||||
return kt;
|
||||
}
|
||||
|
||||
static inline ktime_t
|
||||
ktime_sub_ns(ktime_t kt, int64_t ns)
|
||||
{
|
||||
ktime_t res;
|
||||
|
||||
res.tv64 = kt.tv64 - ns;
|
||||
kt.tv64 -= ns;
|
||||
return kt;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue