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

Unified Diff: content/child/webcrypto/openssl/rsa_ssa_openssl.cc

Issue 444793003: [style] Replace various "X() != 1" checks with "!X()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | « content/child/webcrypto/openssl/rsa_oaep_openssl.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/webcrypto/openssl/rsa_ssa_openssl.cc
diff --git a/content/child/webcrypto/openssl/rsa_ssa_openssl.cc b/content/child/webcrypto/openssl/rsa_ssa_openssl.cc
index 1649515d323bbcab9761671f6210d6921eddf2f3..0a8f4e0e125f8ab8829752fa20482fe4ea40c848 100644
--- a/content/child/webcrypto/openssl/rsa_ssa_openssl.cc
+++ b/content/child/webcrypto/openssl/rsa_ssa_openssl.cc
@@ -105,11 +105,10 @@ class RsaSsaImplementation : public RsaHashedAlgorithm {
if (status.IsError())
return status;
- if (1 != EVP_DigestVerifyInit(ctx.get(), NULL, digest, NULL, public_key))
+ if (!EVP_DigestVerifyInit(ctx.get(), NULL, digest, NULL, public_key))
return Status::OperationError();
- if (1 !=
- EVP_DigestVerifyUpdate(ctx.get(), data.bytes(), data.byte_length())) {
+ if (!EVP_DigestVerifyUpdate(ctx.get(), data.bytes(), data.byte_length())) {
return Status::OperationError();
}
@@ -117,9 +116,8 @@ class RsaSsaImplementation : public RsaHashedAlgorithm {
// 1 --> Success
// 0 --> Verification failed
// <0 --> Operation error
- int rv = EVP_DigestVerifyFinal(ctx.get(),
- signature.bytes(),
- signature.byte_length());
+ int rv = EVP_DigestVerifyFinal(
+ ctx.get(), signature.bytes(), signature.byte_length());
*signature_match = rv == 1;
return rv >= 0 ? Status::Success() : Status::OperationError();
}
« no previous file with comments | « content/child/webcrypto/openssl/rsa_oaep_openssl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698