Skip to content

Commit

Permalink
Flawed logic in timeval_minus
Browse files Browse the repository at this point in the history
  • Loading branch information
kerneis authored and Juliusz Chroboczek committed Jan 12, 2011
1 parent cd2e031 commit d4d9e4e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion event.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ static inline void
timeval_minus(struct timeval *d,
const struct timeval *s1, const struct timeval *s2)
{
if(s1->tv_usec > s2->tv_usec) {
if(s1->tv_usec >= s2->tv_usec) {
d->tv_usec = s1->tv_usec - s2->tv_usec;
d->tv_sec = s1->tv_sec - s2->tv_sec;
} else {
Expand Down

0 comments on commit d4d9e4e

Please sign in to comment.