Fix typo in warning code added to pp_sockpair in c289d2f7288798f8.
authorNicholas Clark <nick@ccl4.org>
Tue, 28 Dec 2010 08:19:03 +0000 (08:19 +0000)
committerNicholas Clark <nick@ccl4.org>
Tue, 28 Dec 2010 08:22:10 +0000 (08:22 +0000)
That should be gv2, not gv1. However, I believe that it's impossible to reach
the warning code, given the structure of the optree that the perl 5
implementation produces, as gv1 and gv2 will never be NULL, and GvIOn() will
always return non-NULL. (Or croak, but that won't return).

pp_sys.c

index 711f93a..b2076cc 100644 (file)
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2452,7 +2452,7 @@ PP(pp_sockpair)
            if (!gv1 || !io1)
                report_evil_fh(gv1, io1, PL_op->op_type);
            if (!gv2 || !io2)
-               report_evil_fh(gv1, io2, PL_op->op_type);
+               report_evil_fh(gv2, io2, PL_op->op_type);
        }
        if (io1 && IoIFP(io1))
            do_close(gv1, FALSE);