diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 02:16:40 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-07-18 02:16:40 +0000 |
commit | 4699312f66889451f5665e81ebcc2f4cb42ca2f0 (patch) | |
tree | f0bc31274bb0036f66a07472161997938809ed2b /pp_sys.c | |
parent | d3c856a50b91fdfa44320c101021c2622612953f (diff) | |
download | perl-4699312f66889451f5665e81ebcc2f4cb42ca2f0.tar.gz |
check ferror() only if read() returned 0
p4raw-id: //depot/perl@1527
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1329,7 +1329,7 @@ PP(pp_sysread) { length = PerlIO_read(IoIFP(io), buffer+offset, length); /* fread() returns 0 on both error and EOF */ - if (PerlIO_error(IoIFP(io))) + if (length == 0 && PerlIO_error(IoIFP(io))) length = -1; } if (length < 0) |