Simplify time() usage.

2011-11-09  Janne Blomqvist  <jb@gcc.gnu.org>

	* intrinsics/time_1.h (gf_gettime): Simplify time() usage.

From-SVN: r181228
This commit is contained in:
Janne Blomqvist 2011-11-09 20:30:38 +02:00
parent 7454437875
commit 9f13f69749
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,7 @@
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
* intrinsics/time_1.h (gf_gettime): Simplify time() usage.
2011-11-09 Janne Blomqvist <jb@gcc.gnu.org>
* configure.ac (AC_STDC_HEADERS): Remove.

View File

@ -213,9 +213,8 @@ gf_gettime (time_t * secs, long * usecs)
*usecs = tv.tv_usec;
return err;
#else
time_t t, t2;
t = time (&t2);
*secs = t2;
time_t t = time (NULL);
*secs = t;
*usecs = 0;
if (t == ((time_t)-1))
return -1;