diff options
author | Karl Williamson <khw@cpan.org> | 2017-03-09 10:55:38 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2017-11-06 12:50:05 -0700 |
commit | f55ac4a45513e50ae06769ee748ea079c9577a7f (patch) | |
tree | 663fe20c1c662cf29b46b6689d8d8b69f3125029 /djgpp | |
parent | b59bf0b2884b21b6f3ce5eca607ab7a6096d87f5 (diff) | |
download | perl-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 'djgpp')
-rw-r--r-- | djgpp/djgpp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/djgpp/djgpp.c b/djgpp/djgpp.c index 6d136e38bb..d1c09aad67 100644 --- a/djgpp/djgpp.c +++ b/djgpp/djgpp.c @@ -162,7 +162,7 @@ do_spawn2 (pTHX_ char *cmd,int execf) 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 */ @@ -173,7 +173,7 @@ do_spawn2 (pTHX_ char *cmd,int execf) { 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=='=') @@ -265,7 +265,7 @@ glob_handler (__FSEXT_Fnumber n,int *rv,va_list args) STRLEN len; glob_t pglob; - if (strnNE (name,"/dev/dosglob/",13)) + if (! strBEGINs (name,"/dev/dosglob/")) break; if ((gi=searchfd (-1)) == NULL) break; |