summaryrefslogtreecommitdiff
path: root/doio.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-01-01 20:26:27 +0000
committerNicholas Clark <nick@ccl4.org>2005-01-01 20:26:27 +0000
commit770526c17acd97e1e85c98bfca98d1d4b69f53f8 (patch)
treecf9680519f3303b2264ba3ac94c1cd7b69c68706 /doio.c
parent9431620da4dbda8a9753e557013462a4cc50b03f (diff)
downloadperl-770526c17acd97e1e85c98bfca98d1d4b69f53f8.tar.gz
strEQ/strNE of 1 character strings seems better hand inlined,
because it generates smaller object code (as well as being faster than a true function call) p4raw-id: //depot/perl@23725
Diffstat (limited to 'doio.c')
-rw-r--r--doio.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/doio.c b/doio.c
index 5e568ed50b..12ec5fef97 100644
--- a/doio.c
+++ b/doio.c
@@ -1,7 +1,7 @@
/* doio.c
*
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- * 2000, 2001, 2002, 2003, 2004, by Larry Wall and others
+ * 2000, 2001, 2002, 2003, 2004, 2005, by Larry Wall and others
*
* You may distribute under the terms of either the GNU General Public
* License or the Artistic License, as specified in the README file.
@@ -265,7 +265,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
errno = EPIPE;
goto say_false;
}
- if (strNE(name,"-") || num_svs)
+ if ((*name == '-' && name[1] == '\0') || num_svs)
TAINT_ENV();
TAINT_PROPER("piped open");
if (!num_svs && name[len-1] == '|') {
@@ -483,7 +483,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
errno = EPIPE;
goto say_false;
}
- if (strNE(name,"-") || num_svs)
+ if (!(*name == '-' && name[1] == '\0') || num_svs)
TAINT_ENV();
TAINT_PROPER("piped open");
mode[0] = 'r';
@@ -519,7 +519,7 @@ Perl_do_openn(pTHX_ GV *gv, register char *name, I32 len, int as_raw,
strcat(mode, "b");
else if (in_crlf)
strcat(mode, "t");
- if (strEQ(name,"-")) {
+ if (*name == '-' && name[1] == '\0') {
fp = PerlIO_stdin();
IoTYPE(io) = IoTYPE_STD;
}