81762, r=jag, sr=sfraser, remove uses of PL_strlen with testing for null and non-empty string

git-svn-id: svn://10.0.0.236/trunk@107046 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
pchen%netscape.com
2001-11-02 02:55:51 +00:00
parent d04d25f44d
commit 72681d9d8a
2 changed files with 4 additions and 4 deletions

View File

@@ -185,13 +185,13 @@ PRBool nsCmdLineService::ArgsMatch(const char *lookingFor, const char *userGave)
#if defined(XP_UNIX) || defined(XP_BEOS)
/* on unix and beos, we'll allow --mail for -mail */
if ((PL_strlen(lookingFor) > 0) && (PL_strlen(userGave) > 1)) {
if (lookingFor && userGave && (lookingFor[0] != '\0') && (userGave[0] != '\0') && (userGave[1] != '\0')) {
if (!PL_strcasecmp(lookingFor+1,userGave+2) && (lookingFor[0] == '-') && (userGave[0] == '-') && (userGave[1] == '-')) return PR_TRUE;
}
#endif
#ifdef XP_PC
/* on windows /mail is the same as -mail */
if ((PL_strlen(lookingFor) > 0) && (PL_strlen(userGave) > 0)) {
if (lookingFor && userGave && (lookingFor[0] != '\0') && (userGave[0] != '\0')) {
if (!PL_strcasecmp(lookingFor+1,userGave+1) && (lookingFor[0] == '-') && (userGave[0] == '/')) return PR_TRUE;
}
#endif