From b2968292db57db2a46c17b0b785f7224a0a63878 Mon Sep 17 00:00:00 2001 From: "thakis@chromium.org" Date: Wed, 28 Mar 2012 01:35:51 +0000 Subject: 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 --- crypto/cssm_init.cc | 6 +++--- crypto/rsa_private_key_mac.cc | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) (limited to 'crypto') 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; -- cgit v1.1