Bug 509730 - Use strchr(), not strstr(), for single-char searches, r=bsmedberg

This commit is contained in:
Steve Snyder 2009-09-22 20:33:24 -07:00
parent ac1be2130e
commit b1da8fa53e
2 changed files with 2 additions and 2 deletions

View File

@ -1271,7 +1271,7 @@ PrepareAcceptCharsets(const char *i_AcceptCharset, nsACString &o_AcceptCharset)
n++;
add_utf = PR_TRUE;
}
if (PL_strstr(acceptable, "*") == NULL) {
if (PL_strchr(acceptable, '*') == NULL) {
n++;
add_asterisk = PR_TRUE;
}

View File

@ -160,7 +160,7 @@ NS_IMETHODIMP nsFilePicker::Show(PRInt16 *retval)
DosError(FERR_DISABLEHARDERR);
WinFileDlg(HWND_DESKTOP, mWnd, &filedlg);
DosError(FERR_ENABLEHARDERR);
char* tempptr = strstr(filedlg.szFullFile, "^");
char* tempptr = strchr(filedlg.szFullFile, '^');
if (tempptr)
*tempptr = '\0';
if (filedlg.lReturn == DID_OK) {