summaryrefslogtreecommitdiff
path: root/ext/PerlIO
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-05-16 08:58:40 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2005-05-16 08:58:40 +0000
commitd26d6e7231f676560b7b29eac7f56fef99b265cb (patch)
tree71ae2f695c139303f49e2f4b029a9a73778136a7 /ext/PerlIO
parentd13bc6520712bc7e86397e420ee3a54995323f54 (diff)
downloadperl-d26d6e7231f676560b7b29eac7f56fef99b265cb.tar.gz
This seems to be the right thing to do to iterate over layers
p4raw-id: //depot/perl@24476
Diffstat (limited to 'ext/PerlIO')
-rw-r--r--ext/PerlIO/via/via.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs
index fffa689a52..36394dd82b 100644
--- a/ext/PerlIO/via/via.xs
+++ b/ext/PerlIO/via/via.xs
@@ -247,7 +247,7 @@ PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
else {
/* Required open method not present */
PerlIO_funcs *tab = NULL;
- const IV m = n - 1;
+ IV m = n - 1;
while (m >= 0) {
PerlIO_funcs *t =
PerlIO_layer_fetch(aTHX_ layers, m, NULL);
@@ -255,7 +255,7 @@ PerlIOVia_open(pTHX_ PerlIO_funcs * self, PerlIO_list_t * layers,
tab = t;
break;
}
- n--;
+ m--;
}
if (tab) {
if ((*tab->Open) (aTHX_ tab, layers, m, mode, fd, imode,