Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(438)

Unified Diff: crypto/rsa_private_key_win.cc

Issue 10332002: win: Fix a few minor issues found by clang. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/service/cloud_print/print_system_win.cc ('k') | sandbox/src/Wow64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: crypto/rsa_private_key_win.cc
diff --git a/crypto/rsa_private_key_win.cc b/crypto/rsa_private_key_win.cc
index d87c1ec058a79f849b22bc33482842c85d67d2ca..dc48a58d38f4e195b560bdcaffc62f3c985e9e01 100644
--- a/crypto/rsa_private_key_win.cc
+++ b/crypto/rsa_private_key_win.cc
@@ -12,15 +12,6 @@
#pragma comment(lib, "crypt32.lib")
-namespace {
- // Helper for error handling during key import.
-#define READ_ASSERT(truth) \
- if (!(truth)) { \
- NOTREACHED(); \
- return false; \
- }
-} // namespace
-
namespace crypto {
// static
@@ -102,7 +93,10 @@ RSAPrivateKey* RSAPrivateKey::CreateFromPrivateKeyInfo(
pki.private_exponent()->size());
dest += pki.private_exponent()->size();
- READ_ASSERT(dest == blob.get() + blob_size);
+ if (dest != blob.get() + blob_size) {
+ NOTREACHED();
+ return NULL;
+ }
if (!CryptImportKey(result->provider_,
reinterpret_cast<uint8*>(public_key_struc), blob_size, 0,
CRYPT_EXPORTABLE, result->key_.receive()))
« no previous file with comments | « chrome/service/cloud_print/print_system_win.cc ('k') | sandbox/src/Wow64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698