aboutsummaryrefslogtreecommitdiff
path: root/bfd/vms-misc.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2010-05-28 09:57:03 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2010-05-28 09:57:03 +0000
commit81c5c866a5705421e71a559589cff136221054e0 (patch)
tree6309fa5e53461113e37cdf226160f5ced52c4444 /bfd/vms-misc.c
parente802dbe04fefcc694efa1ae0c26effc830841a96 (diff)
downloadgdb-81c5c866a5705421e71a559589cff136221054e0.zip
gdb-81c5c866a5705421e71a559589cff136221054e0.tar.gz
gdb-81c5c866a5705421e71a559589cff136221054e0.tar.bz2
bfd/
Workaround GCC PR middle-end/4210. * vms-misc.c (vms_time_t_to_vms_time): Use ternary operator for val[2] and val[3].
Diffstat (limited to 'bfd/vms-misc.c')
-rw-r--r--bfd/vms-misc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/bfd/vms-misc.c b/bfd/vms-misc.c
index c7bd346..49b8274 100644
--- a/bfd/vms-misc.c
+++ b/bfd/vms-misc.c
@@ -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;