bfd/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 May 2010 09:57:03 +0000 (09:57 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Fri, 28 May 2010 09:57:03 +0000 (09:57 +0000)
Workaround GCC PR middle-end/4210.
* vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
and val[3].

bfd/ChangeLog
bfd/vms-misc.c

index 05a1656324107e15303a70b3b1748bab160120ba..6334da07bd37a105ffb545e30c0bf26df7f409d2 100644 (file)
@@ -1,3 +1,9 @@
+2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Workaround GCC PR middle-end/4210.
+       * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2]
+       and val[3].
+
 2010-05-27  Tristan Gingold  <gingold@adacore.com>
 
        * vms-misc.c: Define __NEW_STARLET.  Remove trailing spaces.
index c7bd346837098a69421ebbf50f45b8b356e0fe36..49b8274e772a8f4fdb236717984722c864a725a5 100644 (file)
@@ -585,16 +585,8 @@ vms_time_t_to_vms_time (time_t ut, unsigned int *hi, unsigned int *lo)
   /* Put into val.  */
   val[0] = ut & 0xffff;
   val[1] = (ut >> 16) & 0xffff;
-  if (sizeof (ut) > 4)
-    {
-      val[2] = (ut >> 32) & 0xffff;
-      val[3] = (ut >> 48) & 0xffff;
-    }
-  else
-    {
-      val[2] = 0;
-      val[3] = 0;
-    }
+  val[2] = sizeof (ut) > 4 ? (ut >> 32) & 0xffff : 0;
+  val[3] = sizeof (ut) > 4 ? (ut >> 48) & 0xffff : 0;
 
   /* Add offset.  */
   tmp[0] = VMS_TIME_OFFSET & 0xffff;
This page took 0.026502 seconds and 4 git commands to generate.