mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
tools/dirtpan/dirtpan.c (timeout): fencepost error when normalizing tv_usec
This commit is contained in:
@@ -183,7 +183,7 @@ static struct timeval *timeout(int ms)
|
|||||||
t.tv_sec--;
|
t.tv_sec--;
|
||||||
t.tv_usec += 1000000;
|
t.tv_usec += 1000000;
|
||||||
}
|
}
|
||||||
while (t.tv_usec > 1000000) {
|
while (t.tv_usec >= 1000000) {
|
||||||
t.tv_sec++;
|
t.tv_sec++;
|
||||||
t.tv_usec -= 1000000;
|
t.tv_usec -= 1000000;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user