Patchwork [libfortran] Trivial cleanup committed

login
register
mail settings
Submitter Janne Blomqvist
Date Nov. 9, 2011, 6:32 p.m.
Message ID <CAO9iq9EWAdqOJtVhR4cim58VB-mMUFW_aboGPXuwnavPDBdAEg@mail.gmail.com>
Download mbox | patch
Permalink /patch/124653/
State New
Headers show

Comments

Janne Blomqvist - Nov. 9, 2011, 6:32 p.m.
Hi,

I committed the trivial patch below as obvious to trunk:

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

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

Patch

Index: libgfortran/intrinsics/time_1.h
===================================================================
--- libgfortran/intrinsics/time_1.h     (revision 181227)
+++ libgfortran/intrinsics/time_1.h     (working copy)
@@ -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;