util: simplify clamping in UTI_TimespecNetworkToHost()
This should fix a coverity warning.
This commit is contained in:
parent
702db726d3
commit
a83f0d3cdc
1 changed files with 1 additions and 1 deletions
2
util.c
2
util.c
|
@ -856,7 +856,7 @@ UTI_TimespecNetworkToHost(Timespec *src, struct timespec *dest)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nsec = ntohl(src->tv_nsec);
|
nsec = ntohl(src->tv_nsec);
|
||||||
dest->tv_nsec = CLAMP(0U, nsec, 999999999U);
|
dest->tv_nsec = MIN(nsec, 999999999U);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ================================================== */
|
/* ================================================== */
|
||||||
|
|
Loading…
Reference in a new issue