diff options
author | Stepan Kasal <skasal@redhat.com> | 2009-06-03 12:03:55 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2009-06-08 14:06:10 +0200 |
commit | d7dfc388e04f41b8a0f5d8ef6e15ab3b79f483c8 (patch) | |
tree | f47e9a43533facce67be0f722e2e561d3129cbeb /perlio.c | |
parent | e39d780342f3e91579069fdc80eda72bfe639ae7 (diff) | |
download | perl-d7dfc388e04f41b8a0f5d8ef6e15ab3b79f483c8.tar.gz |
fix RT 39060, errno incorrectly set in perlio
Diffstat (limited to 'perlio.c')
-rw-r--r-- | perlio.c | 12 |
1 files changed, 7 insertions, 5 deletions
@@ -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); |