summaryrefslogtreecommitdiff
path: root/perlio.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2011-01-21 13:08:05 -0600
committerCraig A. Berry <craigberry@mac.com>2011-01-21 13:08:05 -0600
commit6d5bdea2135ddf1eef4c99800e255f81caab4aac (patch)
treec1f89ecfeab93ae63f3b0303f42514260bb496ae /perlio.c
parent6e4c4703d5584b6bcbb9adfe4cdff420d0c88911 (diff)
downloadperl-6d5bdea2135ddf1eef4c99800e255f81caab4aac.tar.gz
PerlIO_push returns NULL, not -1, on failure.
Follow-up to 81fe74fb3f93457df8e864c91546ac6b860657fc.
Diffstat (limited to 'perlio.c')
-rw-r--r--perlio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/perlio.c b/perlio.c
index 3ce31d182a..a7a166722f 100644
--- a/perlio.c
+++ b/perlio.c
@@ -1323,7 +1323,7 @@ PerlIOBase_open(pTHX_ PerlIO_funcs *self, PerlIO_list_t *layers,
PerlIO_funcs * const tab = PerlIO_layer_fetch(aTHX_ layers, n - 1, PerlIO_default_layer(aTHX_ 0));
if (tab && tab->Open) {
PerlIO* ret = (*tab->Open)(aTHX_ tab, layers, n - 1, mode, fd, imode, perm, old, narg, args);
- if (ret && PerlIO_push(aTHX_ ret, self, mode, PerlIOArg) == -1) {
+ if (ret && PerlIO_push(aTHX_ ret, self, mode, PerlIOArg) == NULL) {
PerlIO_close(ret);
return NULL;
}