summaryrefslogtreecommitdiff
path: root/libgfortran/io/transfer.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-10 10:21:31 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2008-10-10 10:21:31 +0000
commit18a8d8ef31080fb83c7706fcc32e01c5054e019d (patch)
treeb081f5bedd4bbb3b5b431946e31f82948a6efb09 /libgfortran/io/transfer.c
parent7e59625d1a6f3ec0132cbb4e83530fd9df32b887 (diff)
downloadgcc-18a8d8ef31080fb83c7706fcc32e01c5054e019d.tar.gz
2008-10-10 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r141021 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@141032 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/io/transfer.c')
-rw-r--r--libgfortran/io/transfer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libgfortran/io/transfer.c b/libgfortran/io/transfer.c
index cf93a286f98..acc7cbe9b94 100644
--- a/libgfortran/io/transfer.c
+++ b/libgfortran/io/transfer.c
@@ -738,8 +738,8 @@ unformatted_read (st_parameter_dt *dtp, bt type,
{
size_t i, sz;
- if (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE
- || size == 1)
+ if (likely (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE)
+ || kind == 1)
{
sz = size * nelems;
if (type == BT_CHARACTER)
@@ -789,8 +789,8 @@ static void
unformatted_write (st_parameter_dt *dtp, bt type,
void *source, int kind, size_t size, size_t nelems)
{
- if (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE ||
- size == 1)
+ if (likely (dtp->u.p.current_unit->flags.convert == GFC_CONVERT_NATIVE)
+ || kind == 1)
{
size_t stride = type == BT_CHARACTER ?
size * GFC_SIZE_OF_CHAR_KIND(kind) : size;