From 82d86f28445f3231f7f9e94ac6678065ab476a8e Mon Sep 17 00:00:00 2001 From: Thomas Schwinge Date: Thu, 8 Mar 2012 11:49:43 +0100 Subject: Fix struct timespec normalization (as used in many other places). --- rt/tst-cpuclock2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rt') diff --git a/rt/tst-cpuclock2.c b/rt/tst-cpuclock2.c index e3545f2..9a74eb0 100644 --- a/rt/tst-cpuclock2.c +++ b/rt/tst-cpuclock2.c @@ -110,7 +110,7 @@ test_nanosleep (clockid_t clock, const char *which, struct timespec sleeptimeabs = sleeptime; sleeptimeabs.tv_sec += after.tv_sec; sleeptimeabs.tv_nsec += after.tv_nsec; - while (sleeptimeabs.tv_nsec > 1000000000) + while (sleeptimeabs.tv_nsec >= 1000000000) { ++sleeptimeabs.tv_sec; sleeptimeabs.tv_nsec -= 1000000000; -- cgit v1.1