summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 01:35:51 +0000
committerthakis@chromium.org <thakis@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-28 01:35:51 +0000
commitb2968292db57db2a46c17b0b785f7224a0a63878 (patch)
treef2a0b0c36e90393aaea82d567c3554606b354356 /crypto
parent6fdd4411046d735e9dba5a163d03262cc618a27f (diff)
downloadchromium_src-b2968292db57db2a46c17b0b785f7224a0a63878.zip
chromium_src-b2968292db57db2a46c17b0b785f7224a0a63878.tar.gz
chromium_src-b2968292db57db2a46c17b0b785f7224a0a63878.tar.bz2
Fix a few warnings that -Wnull-conversion of a future clang will complain about.
BUG=none TEST=none TBR=OWNERS NOTRY=true Review URL: http://codereview.chromium.org/9845017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@129337 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'crypto')
-rw-r--r--crypto/cssm_init.cc6
-rw-r--r--crypto/rsa_private_key_mac.cc9
2 files changed, 8 insertions, 7 deletions
diff --git a/crypto/cssm_init.cc b/crypto/cssm_init.cc
index 23c2660..cf5ac25 100644
--- a/crypto/cssm_init.cc
+++ b/crypto/cssm_init.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -50,8 +50,8 @@ class CSSMInitSingleton {
private:
CSSMInitSingleton()
: inited_(false), csp_loaded_(false), cl_loaded_(false),
- tp_loaded_(false), csp_handle_(NULL), cl_handle_(NULL),
- tp_handle_(NULL) {
+ tp_loaded_(false), csp_handle_(CSSM_INVALID_HANDLE),
+ cl_handle_(CSSM_INVALID_HANDLE), tp_handle_(CSSM_INVALID_HANDLE) {
static CSSM_VERSION version = {2, 0};
// TODO(wtc): what should our caller GUID be?
static const CSSM_GUID test_guid = {
diff --git a/crypto/rsa_private_key_mac.cc b/crypto/rsa_private_key_mac.cc
index 8dcf14a..fbe1491e 100644
--- a/crypto/rsa_private_key_mac.cc
+++ b/crypto/rsa_private_key_mac.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -71,7 +71,8 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
CSSM_KEY_SIZE key_size;
CSSM_RETURN crtn;
- crtn = CSSM_QueryKeySizeInBits(GetSharedCSPHandle(), NULL, &key, &key_size);
+ crtn = CSSM_QueryKeySizeInBits(
+ GetSharedCSPHandle(), CSSM_INVALID_HANDLE, &key, &key_size);
if (crtn) {
NOTREACHED() << "CSSM_QueryKeySizeInBits failed: " << crtn;
return NULL;
@@ -133,8 +134,8 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
public_key->KeyHeader.KeyAttr = CSSM_KEYATTR_EXTRACTABLE;
public_key->KeyHeader.KeyUsage = CSSM_KEYUSE_ANY;
- crtn = CSSM_QueryKeySizeInBits(GetSharedCSPHandle(), NULL, public_key,
- &key_size);
+ crtn = CSSM_QueryKeySizeInBits(
+ GetSharedCSPHandle(), CSSM_INVALID_HANDLE, public_key, &key_size);
if (crtn) {
DLOG(ERROR) << "CSSM_QueryKeySizeInBits failed " << crtn;
return NULL;