зеркало из https://github.com/mozilla/gecko-dev.git
clean up last traces of nsCRT::strlen(char* s), bug 124536 r=dp, sr=brendan
This commit is contained in:
Родитель
173210f48a
Коммит
64856eb68b
|
@ -582,7 +582,7 @@ PRBool nsUnicodeRenderingToolkit :: TransliterateFallbackGetWidth(
|
|||
CGrafPtr thePort;
|
||||
::GetPort((GrafPtr*)&thePort);
|
||||
short aSize = ::GetPortTextSize(thePort);
|
||||
PRInt32 l=nsCRT::strlen(conv);
|
||||
PRInt32 l=strlen(conv);
|
||||
if((l>3) && ('^' == conv[0]) && ('(' == conv[1]) && (')' == conv[l-1])) // sup
|
||||
{
|
||||
short small = aSize * 2 / 3;
|
||||
|
@ -642,7 +642,7 @@ PRBool nsUnicodeRenderingToolkit :: TransliterateFallbackDrawChar(
|
|||
CGrafPtr thePort;
|
||||
::GetPort((GrafPtr*)&thePort);
|
||||
short aSize = ::GetPortTextSize(thePort);
|
||||
PRInt32 l=nsCRT::strlen(conv);
|
||||
PRInt32 l=strlen(conv);
|
||||
if((l>3) && ('^' == conv[0]) && ('(' == conv[1]) && (')' == conv[l-1])) // sup
|
||||
{
|
||||
short small = aSize * 2 / 3;
|
||||
|
|
|
@ -2205,7 +2205,7 @@ nsAbSync::ProcessServerResponse(const char *aProtocolResponse)
|
|||
PRUnichar *msgValue, *outValue=nsnull;
|
||||
|
||||
// Covert server exceed max record msg here.
|
||||
if (! nsCRT::strncasecmp(errorString, SYNC_ERROR_EXCEED_MAX_RECORD, nsCRT::strlen(SYNC_ERROR_EXCEED_MAX_RECORD)))
|
||||
if (! nsCRT::strncasecmp(errorString, SYNC_ERROR_EXCEED_MAX_RECORD, strlen(SYNC_ERROR_EXCEED_MAX_RECORD)))
|
||||
msgValue = GetString(NS_LITERAL_STRING("exceedMaxRecordError").get());
|
||||
else
|
||||
{
|
||||
|
|
|
@ -124,7 +124,7 @@ int fill_apple_mime_header(
|
|||
PR_snprintf(tmpstr, sizeof(tmpstr), "--%s"CRLF, p_ap_encode_obj->boundary);
|
||||
status = write_stream(p_ap_encode_obj,
|
||||
tmpstr,
|
||||
nsCRT::strlen(tmpstr));
|
||||
strlen(tmpstr));
|
||||
return status;
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ int ap_encode_file_infor(
|
|||
int status;
|
||||
|
||||
strcpy((char *)fname+1,p_ap_encode_obj->fname);
|
||||
fname[0] = nsCRT::strlen(p_ap_encode_obj->fname);
|
||||
fname[0] = strlen(p_ap_encode_obj->fname);
|
||||
|
||||
fpb->ioNamePtr = fname;
|
||||
fpb->ioDirID = p_ap_encode_obj->dirId;
|
||||
|
@ -356,7 +356,7 @@ int ap_encode_header(
|
|||
|
||||
status = write_stream(p_ap_encode_obj,
|
||||
rd_buff,
|
||||
nsCRT::strlen(rd_buff));
|
||||
strlen(rd_buff));
|
||||
if (status == noErr)
|
||||
status = errDone;
|
||||
}
|
||||
|
@ -402,7 +402,7 @@ static char *magic_look(char *inbuff, int numread)
|
|||
for (i=0; i<num_magic; i++)
|
||||
{
|
||||
if (magic[i].len == 0)
|
||||
magic[i].len = nsCRT::strlen(magic[i].num);
|
||||
magic[i].len = strlen(magic[i].num);
|
||||
}
|
||||
|
||||
for (i=0; i<num_magic; i++)
|
||||
|
@ -447,7 +447,7 @@ int ap_encode_data(
|
|||
/*
|
||||
** preparing to encode the data fork.
|
||||
*/
|
||||
name[0] = nsCRT::strlen(p_ap_encode_obj->fname);
|
||||
name[0] = strlen(p_ap_encode_obj->fname);
|
||||
PL_strcpy((char*)name+1, p_ap_encode_obj->fname);
|
||||
if (HOpen( p_ap_encode_obj->vRefNum,
|
||||
p_ap_encode_obj->dirId,
|
||||
|
@ -491,7 +491,7 @@ int ap_encode_data(
|
|||
|
||||
status = write_stream(p_ap_encode_obj,
|
||||
rd_buff,
|
||||
nsCRT::strlen(rd_buff));
|
||||
strlen(rd_buff));
|
||||
if (status != noErr)
|
||||
return status;
|
||||
}
|
||||
|
@ -533,7 +533,7 @@ int ap_encode_data(
|
|||
|
||||
status = write_stream(p_ap_encode_obj,
|
||||
rd_buff,
|
||||
nsCRT::strlen(rd_buff));
|
||||
strlen(rd_buff));
|
||||
|
||||
if (status == noErr)
|
||||
status = errDone;
|
||||
|
|
|
@ -548,7 +548,7 @@ nsresult nsMsgComposeSecure::MimeInitMultipartSigned(PRBool aOuter, nsIMsgSendRe
|
|||
&mMultipartSignedBoundary);
|
||||
if (NS_FAILED(rv)) goto FAIL;
|
||||
|
||||
L = nsCRT::strlen(header);
|
||||
L = strlen(header);
|
||||
|
||||
if (aOuter){
|
||||
/* If this is the outer block, write it to the file. */
|
||||
|
@ -602,7 +602,7 @@ nsresult nsMsgComposeSecure::MimeInitEncryption(PRBool aSign, nsIMsgSendReport *
|
|||
MIME_SMIME_ENCRYPTED_CONTENT_DESCRIPTION);
|
||||
PRInt32 L;
|
||||
if (!s) return NS_ERROR_OUT_OF_MEMORY;
|
||||
L = nsCRT::strlen(s);
|
||||
L = strlen(s);
|
||||
if (PRInt32(mStream->write(s, L)) < L) {
|
||||
return NS_ERROR_FAILURE;
|
||||
}
|
||||
|
@ -714,7 +714,7 @@ nsresult nsMsgComposeSecure::MimeFinishMultipartSigned (PRBool aOuter, nsIMsgSen
|
|||
goto FAIL;
|
||||
}
|
||||
|
||||
L = nsCRT::strlen(header);
|
||||
L = strlen(header);
|
||||
if (aOuter) {
|
||||
/* If this is the outer block, write it to the file. */
|
||||
if (PRInt32(mStream->write(header, L)) < L) {
|
||||
|
@ -790,7 +790,7 @@ nsresult nsMsgComposeSecure::MimeFinishMultipartSigned (PRBool aOuter, nsIMsgSen
|
|||
rv = NS_ERROR_OUT_OF_MEMORY;
|
||||
goto FAIL;
|
||||
}
|
||||
L = nsCRT::strlen(header);
|
||||
L = strlen(header);
|
||||
if (aOuter) {
|
||||
/* If this is the outer block, write it to the file. */
|
||||
if (PRInt32(mStream->write(header, L)) < L)
|
||||
|
@ -942,7 +942,7 @@ nsresult nsMsgComposeSecure::MimeCryptoHackCerts(const char *aRecipients,
|
|||
}
|
||||
|
||||
mCerts->AppendElement(cert);
|
||||
mailbox += nsCRT::strlen(mailbox) + 1;
|
||||
mailbox += strlen(mailbox) + 1;
|
||||
}
|
||||
|
||||
if (!already_added_self_cert) {
|
||||
|
|
|
@ -169,7 +169,7 @@ NS_IMETHODIMP nsSMimeJSHelper::GetRecipientCertsInfo(
|
|||
|
||||
for (PRUint32 i = 0;
|
||||
i < mailbox_count;
|
||||
++i, ++iEA, ++iCV, ++iCII, ++iCEI, ++iCert, walk += nsCRT::strlen(walk) + 1)
|
||||
++i, ++iEA, ++iCV, ++iCII, ++iCEI, ++iCert, walk += strlen(walk) + 1)
|
||||
{
|
||||
nsDependentCString email(walk);
|
||||
*iEA = ToNewUnicode(email);
|
||||
|
|
|
@ -140,7 +140,7 @@ PRBool nsEudoraMac::FindEudoraLocation( nsIFileSpec *pFolder, PRBool findIni, ns
|
|||
PRBool isBk = PR_FALSE;
|
||||
PRInt32 len;
|
||||
if (pLeafName) {
|
||||
len = nsCRT::strlen( pLeafName);
|
||||
len = strlen( pLeafName);
|
||||
if (len > 5)
|
||||
isBk = (nsCRT::strcasecmp( pLeafName + len - 5, ".bkup") == 0);
|
||||
nsCRT::free( pLeafName);
|
||||
|
@ -148,7 +148,7 @@ PRBool nsEudoraMac::FindEudoraLocation( nsIFileSpec *pFolder, PRBool findIni, ns
|
|||
if (!isBk) {
|
||||
pLeafName = pref.GetLeafName();
|
||||
if (pLeafName) {
|
||||
len = nsCRT::strlen( pLeafName);
|
||||
len = strlen( pLeafName);
|
||||
if (len > 5)
|
||||
isBk = (nsCRT::strcasecmp( pLeafName + len - 5, ".bkup") == 0);
|
||||
nsCRT::free( pLeafName);
|
||||
|
|
|
@ -607,7 +607,7 @@ MimeCMS_MakeSAURL(MimeObject *obj)
|
|||
PR_FREEIF(id);
|
||||
PR_FREEIF(url);
|
||||
|
||||
stamp_url = (char *) PR_MALLOC(nsCRT::strlen(url2) + 50);
|
||||
stamp_url = (char *) PR_MALLOC(strlen(url2) + 50);
|
||||
if (stamp_url)
|
||||
{
|
||||
PL_strcpy(stamp_url, "about:security?advisor=");
|
||||
|
|
|
@ -598,7 +598,7 @@ nsDNSLookup::ConvertHostEntry()
|
|||
mStatus = NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
// copy name
|
||||
len = nsCRT::strlen(mInetHostInfo.name);
|
||||
len = strlen(mInetHostInfo.name);
|
||||
mHostEntry.hostEnt.h_name = BufAlloc(len + 1, &mHostEntry.bufPtr, &mHostEntry.bufLen, 0);
|
||||
NS_ASSERTION(nsnull != mHostEntry.hostEnt.h_name,"nsHostEnt buffer full.");
|
||||
if (mHostEntry.hostEnt.h_name == nsnull) return;
|
||||
|
|
|
@ -621,7 +621,7 @@ cryptojs_generateOneKeyPair(JSContext *cx, nsKeyPairInfo *keyPairInfo,
|
|||
|
||||
PRUint32 mechanism = cryptojs_convert_to_mechanism(keyPairInfo->keyGenType);
|
||||
void *keyGenParams = nsConvertToActualKeyGenParams(mechanism, params,
|
||||
(params) ? nsCRT::strlen(params):0,
|
||||
(params) ? strlen(params):0,
|
||||
keySize);
|
||||
|
||||
// Make sure the token has password already set on it before trying
|
||||
|
@ -939,7 +939,7 @@ nsSetRegToken(CRMFCertRequest *certReq, char *regToken)
|
|||
|
||||
SECItem src;
|
||||
src.data = (unsigned char*)regToken;
|
||||
src.len = nsCRT::strlen(regToken);
|
||||
src.len = strlen(regToken);
|
||||
SECItem *derEncoded = SEC_ASN1EncodeItem(nsnull, nsnull, &src,
|
||||
__WRAPPER_SEC_ASN1EncodeItem_Param4(SEC_UTF8StringTemplate));
|
||||
|
||||
|
@ -967,7 +967,7 @@ nsSetAuthenticator(CRMFCertRequest *certReq, char *authenticator)
|
|||
|
||||
SECItem src;
|
||||
src.data = (unsigned char*)authenticator;
|
||||
src.len = nsCRT::strlen(authenticator);
|
||||
src.len = strlen(authenticator);
|
||||
SECItem *derEncoded = SEC_ASN1EncodeItem(nsnull, nsnull, &src,
|
||||
__WRAPPER_SEC_ASN1EncodeItem_Param4(SEC_UTF8StringTemplate));
|
||||
if (!derEncoded)
|
||||
|
@ -1763,7 +1763,7 @@ nsCryptoRunnable::Run()
|
|||
jsval retval;
|
||||
if (JS_EvaluateScriptForPrincipals(m_args->m_cx, m_args->m_scope, principals,
|
||||
m_args->m_jsCallback,
|
||||
nsCRT::strlen(m_args->m_jsCallback),
|
||||
strlen(m_args->m_jsCallback),
|
||||
nsnull, 0,
|
||||
&retval) != JS_TRUE) {
|
||||
return NS_ERROR_FAILURE;
|
||||
|
|
|
@ -54,7 +54,7 @@ static void ConvertCharStringToStr255( const char* inString, Str255& outString
|
|||
{
|
||||
if ( inString == NULL )
|
||||
return;
|
||||
PRInt32 len = nsCRT::strlen(inString);
|
||||
PRInt32 len = strlen(inString);
|
||||
NS_ASSERTION( len<= 255 , " String is too big");
|
||||
if ( len> 255 )
|
||||
{
|
||||
|
@ -134,11 +134,11 @@ NS_IMETHODIMP nsInternetConfigService::HasProtocolHandler(const char *protocol,
|
|||
// look for IC pref "\pHelper¥<protocol>"
|
||||
Str255 pref = kICHelper;
|
||||
|
||||
if (nsCRT::strlen(protocol) > 248)
|
||||
if (strlen(protocol) > 248)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
memcpy(pref + pref[0] + 1, protocol, nsCRT::strlen(protocol));
|
||||
pref[0] = pref[0] + nsCRT::strlen(protocol);
|
||||
memcpy(pref + pref[0] + 1, protocol, strlen(protocol));
|
||||
pref[0] = pref[0] + strlen(protocol);
|
||||
|
||||
ICInstance instance = nsInternetConfig::GetInstance();
|
||||
if ( !instance )
|
||||
|
|
|
@ -48,7 +48,7 @@ static void ConvertCharStringToStr255( const char* inString, Str255& outString
|
|||
{
|
||||
if ( inString == NULL )
|
||||
return;
|
||||
PRInt32 len = nsCRT::strlen(inString);
|
||||
PRInt32 len = strlen(inString);
|
||||
NS_ASSERTION( len<= 255 , " String is too big");
|
||||
if ( len> 255 )
|
||||
{
|
||||
|
|
|
@ -54,7 +54,7 @@ static void ConvertCharStringToStr255( const char* inString, Str255& outString
|
|||
{
|
||||
if ( inString == NULL )
|
||||
return;
|
||||
PRInt32 len = nsCRT::strlen(inString);
|
||||
PRInt32 len = strlen(inString);
|
||||
NS_ASSERTION( len<= 255 , " String is too big");
|
||||
if ( len> 255 )
|
||||
{
|
||||
|
@ -134,11 +134,11 @@ NS_IMETHODIMP nsInternetConfigService::HasProtocolHandler(const char *protocol,
|
|||
// look for IC pref "\pHelper¥<protocol>"
|
||||
Str255 pref = kICHelper;
|
||||
|
||||
if (nsCRT::strlen(protocol) > 248)
|
||||
if (strlen(protocol) > 248)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
||||
memcpy(pref + pref[0] + 1, protocol, nsCRT::strlen(protocol));
|
||||
pref[0] = pref[0] + nsCRT::strlen(protocol);
|
||||
memcpy(pref + pref[0] + 1, protocol, strlen(protocol));
|
||||
pref[0] = pref[0] + strlen(protocol);
|
||||
|
||||
ICInstance instance = nsInternetConfig::GetInstance();
|
||||
if ( !instance )
|
||||
|
|
|
@ -48,7 +48,7 @@ static void ConvertCharStringToStr255( const char* inString, Str255& outString
|
|||
{
|
||||
if ( inString == NULL )
|
||||
return;
|
||||
PRInt32 len = nsCRT::strlen(inString);
|
||||
PRInt32 len = strlen(inString);
|
||||
NS_ASSERTION( len<= 255 , " String is too big");
|
||||
if ( len> 255 )
|
||||
{
|
||||
|
|
|
@ -815,7 +815,7 @@ NS_IMETHODIMP nsWindowsHooks::StartupRemoveOption(const char* option) {
|
|||
PRInt32 optionlocation = launchcommand.Find(option, PR_TRUE);
|
||||
// modify by one to get rid of the space we prepended in StartupAddOption
|
||||
if (optionlocation != kNotFound)
|
||||
launchcommand.Cut(optionlocation - 1, nsCRT::strlen(option) + 1);
|
||||
launchcommand.Cut(optionlocation - 1, strlen(option) + 1);
|
||||
}
|
||||
|
||||
if (launchcommand.IsEmpty())
|
||||
|
|
Загрузка…
Ссылка в новой задаче