nanosleep: simplify carrying
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Jun 2011 18:55:20 +0000 (11:55 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 25 Jun 2011 18:55:20 +0000 (11:55 -0700)
commitc4c53bb2f7c0a05e9795da46ea3ddc17b2ef0c78
treef9146fb3eddf77e67618c988044936df5031456a
parentab867f51781b5153e6e4e88a6212174d7233df3a
nanosleep: simplify carrying

* lib/nanosleep.c (nanosleep): Use the requested tv_nsec for the
first call to the underyling nanosleep, not for the last one.
This doesn't fix any bugs, but it simplifies the computation of
the remaining delay.  Found while auditing integer overflow issues.
ChangeLog
lib/nanosleep.c