Skip to content

Commit

Permalink
[PATCH] Make sure to always check upper bits of tv_nsec in timespec_v…
Browse files Browse the repository at this point in the history
…alid.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Chris Wright authored and Linus Torvalds committed Feb 1, 2006
1 parent 078a9b0 commit bd3f8f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/time.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit bd3f8f2

Please sign in to comment.