mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 05:31:08 -04:00
[PATCH] Make sure to always check upper bits of tv_nsec in timespec_valid.
Signed-off-by: Chris Wright <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
1 parent
078a9b0388
commit
bd3f8f2b12
1 file changed
+1
-1
@@ -48,7 +48,7 @@ extern void set_normalized_timespec(struct timespec *ts, time_t sec, long nsec);
|
||||
* Returns true if the timespec is norm, false if denorm:
|
||||
*/
|
||||
#define timespec_valid(ts) \
|
||||
(((ts)->tv_sec >= 0) && (((unsigned) (ts)->tv_nsec) < NSEC_PER_SEC))
|
||||
(((ts)->tv_sec >= 0) && (((unsigned long) (ts)->tv_nsec) < NSEC_PER_SEC))
|
||||
|
||||
/*
|
||||
* 64-bit nanosec type. Large enough to span 292+ years in nanosecond
|
||||
|
||||
Reference in new issue
Block a user