rv_2av, rv_2cv and rv_2hv also make use of OPf_SPECIAL, so update the
[p5sagit/p5-mst-13.2.git] / perlio.c
index c7543d2..49b1b2d 100644 (file)
--- a/perlio.c
+++ b/perlio.c
@@ -1296,9 +1296,10 @@ PerlIO_apply_layers(pTHX_ PerlIO *f, const char *mode, const char *names)
 int
 PerlIO_binmode(pTHX_ PerlIO *f, int iotype, int mode, const char *names)
 {
-    PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n",
-                (void*)f, PerlIOBase(f)->tab->name, iotype, mode,
-                (names) ? names : "(Null)");
+    PerlIO_debug("PerlIO_binmode f=%p %s %c %x %s\n", (void*)f,
+                 (PerlIOBase(f)) ? PerlIOBase(f)->tab->name : "(Null)",
+                 iotype, mode, (names) ? names : "(Null)");
+
     if (names) {
        /* Do not flush etc. if (e.g.) switching encodings.
           if a pushed layer knows it needs to flush lower layers
@@ -1546,8 +1547,8 @@ PerlIO_openn(pTHX_ const char *layers, const char *mode, int fd,
                Perl_croak(aTHX_ "More than one argument to open(,':%s')",tab->name);
            }
            PerlIO_debug("openn(%s,'%s','%s',%d,%x,%o,%p,%d,%p)\n",
-                        tab->name, layers, mode, fd, imode, perm,
-                        (void*)f, narg, (void*)args);
+                        tab->name, layers ? layers : "(Null)", mode, fd,
+                        imode, perm, (void*)f, narg, (void*)args);
            if (tab->Open)
                 f = (*tab->Open) (aTHX_ tab, layera, n, mode, fd, imode, perm,
                                   f, narg, args);
@@ -3169,7 +3170,7 @@ PerlIOStdio_flush(pTHX_ PerlIO *f)
        /*
         * Not writeable - sync by attempting a seek
         */
-       int err = errno;
+       const int err = errno;
        if (PerlSIO_fseek(stdio, (Off_t) 0, SEEK_CUR) != 0)
            errno = err;
 #endif