* timer.cc (getitimer): Don't create another local ret variable in

timer_gettime calling branch.  Simplify conditional since timer_gettime
	always returns 0 or -1 anyway.
This commit is contained in:
Corinna Vinschen 2012-02-17 17:34:01 +00:00
parent 1cb1472404
commit 2196614e3d
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2012-02-17 Corinna Vinschen <corinna@vinschen.de>
* timer.cc (getitimer): Don't create another local ret variable in
timer_gettime calling branch. Simplify conditional since timer_gettime
always returns 0 or -1 anyway.
2012-02-17 Corinna Vinschen <corinna@vinschen.de>
* ntdll.h (struct _PEB): Add EnvironmentUpdateCount member.

View File

@ -423,10 +423,8 @@ getitimer (int which, struct itimerval *ovalue)
else
{
struct itimerspec spec_ovalue;
int ret = timer_gettime ((timer_t) &ttstart, &spec_ovalue);
if (ret)
ret = -1;
else
ret = timer_gettime ((timer_t) &ttstart, &spec_ovalue);
if (!ret)
{
ovalue->it_interval.tv_sec = spec_ovalue.it_interval.tv_sec;
ovalue->it_interval.tv_usec = spec_ovalue.it_interval.tv_nsec / 1000;