This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0a484d
)
check ferror() only if read() returned 0
author
Gurusamy Sarathy
<gsar@cpan.org>
Sat, 18 Jul 1998 02:16:40 +0000
(
02:16
+0000)
committer
Gurusamy Sarathy
<gsar@cpan.org>
Sat, 18 Jul 1998 02:16:40 +0000
(
02:16
+0000)
p4raw-id: //depot/perl@1527
pp_sys.c
patch
|
blob
|
blame
|
history
diff --git
a/pp_sys.c
b/pp_sys.c
index
fe75220
..
f880719
100644
(file)
--- a/
pp_sys.c
+++ b/
pp_sys.c
@@
-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)