summaryrefslogtreecommitdiff
path: root/cygwin
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2017-03-09 10:55:38 -0700
committerKarl Williamson <khw@cpan.org>2017-11-06 12:50:05 -0700
commitf55ac4a45513e50ae06769ee748ea079c9577a7f (patch)
tree663fe20c1c662cf29b46b6689d8d8b69f3125029 /cygwin
parentb59bf0b2884b21b6f3ce5eca607ab7a6096d87f5 (diff)
downloadperl-f55ac4a45513e50ae06769ee748ea079c9577a7f.tar.gz
Change some strncmp(), etc. to strBEGINs()
The latter is much clearer as to what's going on, and the programmer and program reader don't have to count characters.
Diffstat (limited to 'cygwin')
-rw-r--r--cygwin/cygwin.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cygwin/cygwin.c b/cygwin/cygwin.c
index 7bcf02ab34..a234825eba 100644
--- a/cygwin/cygwin.c
+++ b/cygwin/cygwin.c
@@ -98,7 +98,7 @@ do_spawn (char *cmd)
while (*cmd && isSPACE(*cmd))
cmd++;
- if (strnEQ (cmd,"/bin/sh",7) && isSPACE (cmd[7]))
+ if (strBEGINs (cmd,"/bin/sh") && isSPACE (cmd[7]))
cmd+=5;
/* save an extra exec if possible */
@@ -107,7 +107,7 @@ do_spawn (char *cmd)
goto doshell;
if (*cmd=='.' && isSPACE (cmd[1]))
goto doshell;
- if (strnEQ (cmd,"exec",4) && isSPACE (cmd[4]))
+ if (strBEGINs (cmd,"exec") && isSPACE (cmd[4]))
goto doshell;
for (s=cmd; *s && isALPHA (*s); s++) ; /* catch VAR=val gizmo */
if (*s=='=')