From: Nicholas Clark Date: Fri, 6 Sep 2002 23:00:14 +0000 (+0100) Subject: tiddly tidy up for util.c X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd322ea4b51d50f9797ac81898fa52eb789ab9ba;p=p5sagit%2Fp5-mst-13.2.git tiddly tidy up for util.c Message-ID: <20020906220013.GD428@Bagpuss.unfortu.net> p4raw-id: //depot/perl@17871 --- diff --git a/util.c b/util.c index 9dcade2..ae5adb6 100644 --- 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 {