tiddly tidy up for util.c
Nicholas Clark [Fri, 6 Sep 2002 23:00:14 +0000 (00:00 +0100)]
Message-ID: <20020906220013.GD428@Bagpuss.unfortu.net>

p4raw-id: //depot/perl@17871

util.c

diff --git a/util.c b/util.c
index 9dcade2..ae5adb6 100644 (file)
--- a/util.c
+++ b/util.c
@@ -3499,14 +3499,14 @@ Perl_report_evil_fh(pTHX_ GV *gv, IO *io, I32 op)
 
     if (op == OP_phoney_OUTPUT_ONLY || op == OP_phoney_INPUT_ONLY) {
        if (ckWARN(WARN_IO)) {
+           const char *direction = (op == OP_phoney_INPUT_ONLY) ? "in" : "out";
            if (name && *name)
                Perl_warner(aTHX_ packWARN(WARN_IO),
                            "Filehandle %s opened only for %sput",
-                           name, (op == OP_phoney_INPUT_ONLY ? "in" : "out"));
+                           name, direction);
            else
                Perl_warner(aTHX_ packWARN(WARN_IO),
-                           "Filehandle opened only for %sput",
-                           (op == OP_phoney_INPUT_ONLY ? "in" : "out"));
+                           "Filehandle opened only for %sput", direction);
        }
     }
     else {