1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-12-29 03:24:36 +02:00

tools/dirtpan/dirtpan.c (timeout): fencepost error when normalizing tv_usec

This commit is contained in:
Werner Almesberger 2011-05-11 15:43:07 -03:00
parent 171500e414
commit 354789da8d

View File

@ -183,7 +183,7 @@ static struct timeval *timeout(int ms)
t.tv_sec--;
t.tv_usec += 1000000;
}
while (t.tv_usec > 1000000) {
while (t.tv_usec >= 1000000) {
t.tv_sec++;
t.tv_usec -= 1000000;
}