(FT_Stream_Open): Check errno only if read system call returns -1. Remove a redundant parenthesis.
diff --git a/ChangeLog b/ChangeLog
index dd3a3fe..b6302b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-05-11 Masatake YAMATO <jet@gyve.org>
+
+ * builds/unix/ftsystem.c (FT_Stream_Open): Check errno only if
+ read system call returns -1.
+ Remove a redundant parenthesis.
+
2006-05-10 Werner Lemberg <wl@gnu.org>
* builds/unix/ftsystem.c (FT_Stream_Open): Avoid infinite loop if
diff --git a/builds/unix/ftsystem.c b/builds/unix/ftsystem.c
index 78da9d5..c46b1c0 100644
--- a/builds/unix/ftsystem.c
+++ b/builds/unix/ftsystem.c
@@ -303,9 +303,9 @@
stream->base + total_read_count,
stream->size - total_read_count );
- if ( ( read_count <= 0 ) )
+ if ( read_count <= 0 )
{
- if ( errno == EINTR )
+ if ( read_count == -1 && errno == EINTR )
continue;
FT_ERROR(( "FT_Stream_Open:" ));