Bug 784739 - Switch from NULL to nullptr in security/; r=ehsan

This commit is contained in:
Birunthan Mohanathas 2013-10-28 10:05:19 -04:00
Родитель 4360fad5a0
Коммит 145d3ff4f2
8 изменённых файлов: 13 добавлений и 12 удалений

Просмотреть файл

@ -236,7 +236,7 @@ class ScopedAutoSECItem MOZ_FINAL : public SECItem
public:
ScopedAutoSECItem(uint32_t initialAllocatedLen = 0)
{
data = NULL;
data = nullptr;
len = 0;
if (initialAllocatedLen > 0) {
SECITEM_AllocItem(*this, initialAllocatedLen);

Просмотреть файл

@ -2307,8 +2307,8 @@ nsCrypto::ImportUserCertificates(const nsAString& aNickname,
//certificates. Let's keep an array of them around which
//we pass along to the nsP12Runnable to use.
certArr = new nsIX509Cert*[numResponses];
// If this is NULL, chances are we're gonna fail really soon,
// but let's try to keep going just in case.
// If this is nullptr, chances are we're gonna fail really
// soon, but let's try to keep going just in case.
if (!certArr)
aDoForcedBackup = false;

Просмотреть файл

@ -88,7 +88,7 @@ struct nsMyTrustedEVInfo
* Remove all whitespaces. If you use multiple lines, make sure that
* only the final line will be followed by a comma.
* - the "Serial DER Base64" (as printed by pp)
* - a NULL pointer value
* - a nullptr value
*
* After adding an entry, test it locally against the test site that
* has been provided by the CA. Note that you must use a version of NSS

Просмотреть файл

@ -942,8 +942,8 @@ ProcessName(CERTName *name, nsINSSComponent *nssComponent, PRUnichar **value)
lastRdn = rdns;
while (*lastRdn) lastRdn++;
// The above whille loop will put us at the last member
// of the array which is a NULL pointer. So let's back
// up one spot so that we have the last non-NULL entry in
// of the array which is a nullptr pointer. So let's back
// up one spot so that we have the last non-nullptr entry in
// the array in preparation for traversing the
// RDN's (Relative Distinguished Name) in reverse oder.
lastRdn--;

Просмотреть файл

@ -2024,9 +2024,9 @@ private:
* - socket: SSL socket we're dealing with
* - caNames: list of CA names
* - pRetCert: returns a pointer to a pointer to a valid certificate if
* successful; otherwise NULL
* successful; otherwise nullptr
* - pRetKey: returns a pointer to a pointer to the corresponding key if
* successful; otherwise NULL
* successful; otherwise nullptr
* - returns: SECSuccess if successful; error code otherwise
*/
SECStatus nsNSS_SSLGetClientAuthData(void* arg, PRFileDesc* socket,

Просмотреть файл

@ -64,7 +64,7 @@ private:
// - When the user entered a zero length password.
// An empty password should be represented as an empty
// string (a SECItem that contains a single terminating
// NULL UTF16 character), but some applications use a
// null UTF16 character), but some applications use a
// zero length SECItem.
// We try both variations, zero length item and empty string,
// without giving a user prompt when trying the different empty password flavors.

Просмотреть файл

@ -30,7 +30,7 @@ nsRandomGenerator::GenerateRandomBytes(uint32_t aLength,
return NS_ERROR_OUT_OF_MEMORY;
mozilla::ScopedPK11SlotInfo slot(PK11_GetInternalSlot());
if (slot == NULL) {
if (slot == nullptr) {
return NS_ERROR_FAILURE;
}
SECStatus srv = PK11_GenerateRandomOnSlot(slot, buf, aLength);

Просмотреть файл

@ -11,6 +11,7 @@
#include <signal.h>
#include <string.h>
#include "mozilla/NullPtr.h"
#include "mozilla/Util.h"
#if defined(ANDROID)
#include "android_ucontext.h"
@ -109,12 +110,12 @@ InstallSyscallReporter(void)
act.sa_sigaction = &Reporter;
act.sa_flags = SA_SIGINFO | SA_NODEFER;
if (sigaction(SIGSYS, &act, NULL) < 0) {
if (sigaction(SIGSYS, &act, nullptr) < 0) {
return -1;
}
if (sigemptyset(&mask) ||
sigaddset(&mask, SIGSYS) ||
sigprocmask(SIG_UNBLOCK, &mask, NULL)) {
sigprocmask(SIG_UNBLOCK, &mask, nullptr)) {
return -1;
}
return 0;