summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorStepan Kasal <skasal@redhat.com>2009-06-03 12:03:55 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2009-06-08 14:06:10 +0200
commitd7dfc388e04f41b8a0f5d8ef6e15ab3b79f483c8 (patch)
treef47e9a43533facce67be0f722e2e561d3129cbeb /perlio.c
parente39d780342f3e91579069fdc80eda72bfe639ae7 (diff)
downloadperl-d7dfc388e04f41b8a0f5d8ef6e15ab3b79f483c8.tar.gz
fix RT 39060, errno incorrectly set in perlio
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/perlio.c b/perlio.c
index 0a086a8b4f..e92a32ac8f 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1784,12 +1784,14 @@ PerlIO_has_base(PerlIO *f)
int
PerlIO_fast_gets(PerlIO *f)
{
- if (PerlIOValid(f) && (PerlIOBase(f)->flags & PERLIO_F_FASTGETS)) {
- const PerlIO_funcs * const tab = PerlIOBase(f)->tab;
+ if (PerlIOValid(f)) {
+ if (PerlIOBase(f)->flags & PERLIO_F_FASTGETS) {
+ const PerlIO_funcs * const tab = PerlIOBase(f)->tab;
- if (tab)
- return (tab->Set_ptrcnt != NULL);
- SETERRNO(EINVAL, LIB_INVARG);
+ if (tab)
+ return (tab->Set_ptrcnt != NULL);
+ SETERRNO(EINVAL, LIB_INVARG);
+ }
}
else
SETERRNO(EBADF, SS_IVCHAN);