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

Unified Diff: content/child/webcrypto/openssl/rsa_oaep_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
Index: content/child/webcrypto/openssl/rsa_oaep_openssl.cc
diff --git a/content/child/webcrypto/openssl/rsa_oaep_openssl.cc b/content/child/webcrypto/openssl/rsa_oaep_openssl.cc
index dc12490dd49f8655910b62dc30d1ea9c14fe9a36..da88c62214a55cb07be190822cd7f91a5fba1402 100644
--- a/content/child/webcrypto/openssl/rsa_oaep_openssl.cc
+++ b/content/child/webcrypto/openssl/rsa_oaep_openssl.cc
@@ -51,7 +51,7 @@ Status CommonEncryptDecrypt(InitFunc init_func,
crypto::ScopedEVP_PKEY_CTX ctx(EVP_PKEY_CTX_new(pkey, NULL));
- if (1 != init_func(ctx.get()) ||
+ if (!init_func(ctx.get()) ||
1 != EVP_PKEY_CTX_set_rsa_padding(ctx.get(), RSA_PKCS1_OAEP_PADDING) ||
1 != EVP_PKEY_CTX_set_rsa_oaep_md(ctx.get(), digest) ||
1 != EVP_PKEY_CTX_set_rsa_mgf1_md(ctx.get(), digest)) {
@@ -76,18 +76,18 @@ Status CommonEncryptDecrypt(InitFunc init_func,
// Determine the maximum length of the output.
size_t outlen = 0;
- if (1 != encrypt_decrypt_func(
- ctx.get(), NULL, &outlen, data.bytes(), data.byte_length())) {
+ if (!encrypt_decrypt_func(
+ ctx.get(), NULL, &outlen, data.bytes(), data.byte_length())) {
return Status::OperationError();
}
buffer->resize(outlen);
// Do the actual encryption/decryption.
- if (1 != encrypt_decrypt_func(ctx.get(),
- vector_as_array(buffer),
- &outlen,
- data.bytes(),
- data.byte_length())) {
+ if (!encrypt_decrypt_func(ctx.get(),
+ vector_as_array(buffer),
+ &outlen,
+ data.bytes(),
+ data.byte_length())) {
return Status::OperationError();
}
buffer->resize(outlen);
« no previous file with comments | « content/child/webcrypto/openssl/rsa_key_openssl.cc ('k') | content/child/webcrypto/openssl/rsa_ssa_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698