Commit c2dcabd1 authored by kylechar's avatar kylechar Committed by Commit Bot

Fix scoped_refptr construction from NULL

This is a precursor to adding a new scoped_refptr(std::nullptr_t)
constructor. The implicit conversion from NULL to scoped_refptr<T>
causes a compilation error with the new constructor. Replace NULL with
nullptr in any files where this is a problem.

This CL was uploaded by git cl split.

R=nharper@chromium.org

Bug: 1018887
Change-Id: Id2d23759b383b43fea02bfba279ec96286da5eb9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884997
Auto-Submit: kylechar <kylechar@chromium.org>
Reviewed-by: default avatarNick Harper <nharper@chromium.org>
Commit-Queue: Nick Harper <nharper@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710049}
parent 0a074c79
......@@ -75,19 +75,19 @@ scoped_refptr<X509Certificate> ImportClientCertAndKeyFromFile(
ScopedCERTCertificate* nss_cert) {
if (!ImportSensitiveKeyFromFile(dir, key_filename, slot)) {
LOG(ERROR) << "Could not import private key from file " << key_filename;
return NULL;
return nullptr;
}
scoped_refptr<X509Certificate> cert(ImportCertFromFile(dir, cert_filename));
if (!cert.get()) {
LOG(ERROR) << "Failed to parse cert from file " << cert_filename;
return NULL;
return nullptr;
}
*nss_cert = ImportClientCertToSlot(cert, slot);
if (!*nss_cert)
return NULL;
return nullptr;
// |cert| continues to point to the original X509Certificate before the
// import to |slot|. However this should not make a difference as NSS handles
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment