No description provided.
Remove always true cases in wallet/crypter.cpp encrypt and decrypt function #7643
pull JeremyRubin wants to merge 1 commits into bitcoin:master from JeremyRubin:master changing 1 files +4 −8-
JeremyRubin commented at 5:12 PM on March 4, 2016: contributor
-
Remove always true cases in wallet/crypter.cpp encrypt and decrypt function cca29a6727
-
in src/wallet/crypter.cpp:None in cca29a6727
63 | - bool fOk = true; 64 | - 65 | EVP_CIPHER_CTX_init(&ctx); 66 | - if (fOk) fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0; 67 | + 68 | + bool fOk = EVP_EncryptInit_ex(&ctx, EVP_aes_256_cbc(), NULL, chKey, chIV) != 0;
jonasschnelli commented at 5:18 PM on March 4, 2016:IMO this results in the same (remove code) as above. The L66 EVP function only gets executed when fOk is true (which is always true at L66). fOk will then be set to true if the EVP function did not return 0.
I think the current code works right.
paveljanik commented at 7:49 PM on March 4, 2016:... and looks ugly 8)
ACK
jonasschnelli commented at 7:54 PM on March 4, 2016: contributorYes. This code is cleaner.
utACK.
MarcoFalke commented at 5:17 PM on March 5, 2016: memberNACK, I like the previous code better because the "formatting" is uniform. Also, I am pretty sure the compiler will remove this case. Apart from that, agree with @theuni
jonasschnelli added the label Wallet on Mar 6, 2016laanwj closed this on Mar 6, 2016MarcoFalke locked this on Sep 8, 2021Labels
github-metadata-mirror
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 21:16 UTC
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-15 21:16 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me