config_H being the last part of my mkglossary work
[p5sagit/p5-mst-13.2.git] / pp_sys.c
index cc77d50..c8a4638 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -1374,15 +1374,13 @@ PP(pp_leavewrite)
            gv_efullname4(sv, fgv, NULL, FALSE);
            name = SvPV_nolen_const(sv);
            if (name && *name)
-               DIE(aTHX_ "Undefined top format \"%s\" called",name);
+               DIE(aTHX_ "Undefined top format \"%s\" called", name);
+           else
+               DIE(aTHX_ "Undefined top format called");
        }
-       /* why no:
-       else
-           DIE(aTHX_ "Undefined top format called");
-       ?*/
-       if (CvCLONE(cv))
+       if (cv && CvCLONE(cv))
            cv = (CV*)sv_2mortal((SV*)cv_clone(cv));
-       return doform(cv,gv,PL_op);
+       return doform(cv, gv, PL_op);
     }
 
   forget_top:
@@ -2276,7 +2274,7 @@ PP(pp_socket)
     if (!gv || !io) {
        if (ckWARN2(WARN_UNOPENED,WARN_CLOSED))
            report_evil_fh(gv, io, PL_op->op_type);
-       if (IoIFP(io))
+       if (io && IoIFP(io))
            do_close(gv, FALSE);
        SETERRNO(EBADF,LIB_INVARG);
        RETPUSHUNDEF;
@@ -2332,9 +2330,9 @@ PP(pp_sockpair)
            if (!gv2 || !io2)
                report_evil_fh(gv1, io2, PL_op->op_type);
        }
-       if (IoIFP(io1))
+       if (io1 && IoIFP(io1))
            do_close(gv1, FALSE);
-       if (IoIFP(io2))
+       if (io2 && IoIFP(io2))
            do_close(gv2, FALSE);
        RETPUSHUNDEF;
     }
@@ -5194,7 +5192,6 @@ PP(pp_ggrent)
     }
 
     if (grent) {
-       SV *sv;
        PUSHs(sv_2mortal(newSVpv(grent->gr_name, 0)));
 
 #ifdef GRPASSWD