зеркало из https://github.com/mozilla/gecko-dev.git
Bug 777292 - security/manager/: Don't treat number of bytes as an nsresult; r=kaie
This commit is contained in:
Родитель
ebbeed4a32
Коммит
6e66d97fbf
|
@ -297,7 +297,7 @@ WriteEntryCallback(nsCertOverrideEntry *aEntry,
|
|||
|
||||
nsIOutputStream *rawStreamPtr = (nsIOutputStream *)aArg;
|
||||
|
||||
nsresult rv;
|
||||
PRUint32 unused;
|
||||
|
||||
if (rawStreamPtr && aEntry)
|
||||
{
|
||||
|
@ -309,19 +309,19 @@ WriteEntryCallback(nsCertOverrideEntry *aEntry,
|
|||
nsCertOverride::convertBitsToString(settings.mOverrideBits,
|
||||
bits_string);
|
||||
|
||||
rawStreamPtr->Write(aEntry->mHostWithPort.get(), aEntry->mHostWithPort.Length(), &rv);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv);
|
||||
rawStreamPtr->Write(aEntry->mHostWithPort.get(), aEntry->mHostWithPort.Length(), &unused);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused);
|
||||
rawStreamPtr->Write(settings.mFingerprintAlgOID.get(),
|
||||
settings.mFingerprintAlgOID.Length(), &rv);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv);
|
||||
settings.mFingerprintAlgOID.Length(), &unused);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused);
|
||||
rawStreamPtr->Write(settings.mFingerprint.get(),
|
||||
settings.mFingerprint.Length(), &rv);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv);
|
||||
settings.mFingerprint.Length(), &unused);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused);
|
||||
rawStreamPtr->Write(bits_string.get(),
|
||||
bits_string.Length(), &rv);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &rv);
|
||||
rawStreamPtr->Write(settings.mDBKey.get(), settings.mDBKey.Length(), &rv);
|
||||
rawStreamPtr->Write(NS_LINEBREAK, NS_LINEBREAK_LEN, &rv);
|
||||
bits_string.Length(), &unused);
|
||||
rawStreamPtr->Write(kTab, sizeof(kTab) - 1, &unused);
|
||||
rawStreamPtr->Write(settings.mDBKey.get(), settings.mDBKey.Length(), &unused);
|
||||
rawStreamPtr->Write(NS_LINEBREAK, NS_LINEBREAK_LEN, &unused);
|
||||
}
|
||||
|
||||
return PL_DHASH_NEXT;
|
||||
|
@ -361,7 +361,8 @@ nsCertOverrideService::Write()
|
|||
|
||||
/* see ::Read for file format */
|
||||
|
||||
bufferedOutputStream->Write(kHeader, sizeof(kHeader) - 1, &rv);
|
||||
PRUint32 unused;
|
||||
bufferedOutputStream->Write(kHeader, sizeof(kHeader) - 1, &unused);
|
||||
|
||||
nsIOutputStream *rawStreamPtr = bufferedOutputStream;
|
||||
mSettingsTable.EnumerateEntries(WriteEntryCallback, rawStreamPtr);
|
||||
|
|
Загрузка…
Ссылка в новой задаче