sys: timeutil: Fix warning in timespec_is_valid
Cast NSEC_PER_SEC to long to resolve a compiler warning about comparison between signed and unsigned integer expression. Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
This commit is contained in:
parent
93e9016775
commit
9ab0c1b183
1 changed files with 1 additions and 1 deletions
|
@ -338,7 +338,7 @@ static inline bool timespec_is_valid(const struct timespec *ts)
|
||||||
{
|
{
|
||||||
__ASSERT_NO_MSG(ts != NULL);
|
__ASSERT_NO_MSG(ts != NULL);
|
||||||
|
|
||||||
return (ts->tv_nsec >= 0) && (ts->tv_nsec < NSEC_PER_SEC);
|
return (ts->tv_nsec >= 0) && (ts->tv_nsec < (long)NSEC_PER_SEC);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue