提交 bd3f8f2b 编写于 作者: C Chris Wright 提交者: Linus Torvalds

[PATCH] Make sure to always check upper bits of tv_nsec in timespec_valid.

Signed-off-by: NChris Wright <chrisw@sous-sol.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 078a9b03
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册