Skip to content

Commit 7f3c669

Browse files
committed
Fix #if defined usages
1 parent e55444a commit 7f3c669

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

src/bench/verify_script.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <bench/bench.h>
66
#include <key.h>
7-
#if defined(HAVE_CONSENSUS_LIB)
7+
#if HAVE_CONSENSUS_LIB
88
#include <script/bitcoinconsensus.h>
99
#endif
1010
#include <script/script.h>
@@ -92,7 +92,7 @@ static void VerifyScriptBench(benchmark::State& state)
9292
assert(err == SCRIPT_ERR_OK);
9393
assert(success);
9494

95-
#if defined(HAVE_CONSENSUS_LIB)
95+
#if HAVE_CONSENSUS_LIB
9696
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
9797
stream << txSpend;
9898
int csuccess = bitcoinconsensus_verify_script_with_amount(

src/crypto/sha256.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,13 @@ std::string SHA256AutoDetect()
620620
TransformD64 = TransformD64Wrapper<sha256_sse4::Transform>;
621621
ret = "sse4(1way)";
622622
#endif
623-
#if defined(ENABLE_SSE41) && !defined(BUILD_BITCOIN_INTERNAL)
623+
#if ENABLE_SSE41 && !defined(BUILD_BITCOIN_INTERNAL)
624624
TransformD64_4way = sha256d64_sse41::Transform_4way;
625625
ret += ",sse41(4way)";
626626
#endif
627627
}
628628

629-
#if defined(ENABLE_AVX2) && !defined(BUILD_BITCOIN_INTERNAL)
629+
#if ENABLE_AVX2 && !defined(BUILD_BITCOIN_INTERNAL)
630630
if (have_avx2 && have_avx && enabled_avx) {
631631
TransformD64_8way = sha256d64_avx2::Transform_8way;
632632
ret += ",avx2(8way)";

src/qt/test/test_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int main(int argc, char *argv[])
8383
if (QTest::qExec(&test1) != 0) {
8484
fInvalid = true;
8585
}
86-
#if defined(ENABLE_WALLET) && defined(ENABLE_BIP70)
86+
#if ENABLE_WALLET && ENABLE_BIP70
8787
PaymentServerTests test2;
8888
if (QTest::qExec(&test2) != 0) {
8989
fInvalid = true;

src/script/bitcoinconsensus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
#define EXPORT_SYMBOL
1919
#endif
2020
#endif
21-
#elif defined(HAVE_FUNC_ATTRIBUTE_VISIBILITY)
21+
#elif HAVE_FUNC_ATTRIBUTE_VISIBILITY
2222
#define EXPORT_SYMBOL __attribute__ ((visibility ("default")))
2323
#endif
2424
#elif defined(MSC_VER) && !defined(STATIC_LIBBITCOINCONSENSUS)

src/test/script_tests.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <rpc/util.h>
1717
#include <streams.h>
1818

19-
#if defined(HAVE_CONSENSUS_LIB)
19+
#if HAVE_CONSENSUS_LIB
2020
#include <script/bitcoinconsensus.h>
2121
#endif
2222

@@ -179,7 +179,7 @@ void DoTest(const CScript& scriptPubKey, const CScript& scriptSig, const CScript
179179
BOOST_CHECK_MESSAGE(VerifyScript(scriptSig, scriptPubKey, &scriptWitness, combined_flags, MutableTransactionSignatureChecker(&tx, 0, txCredit.vout[0].nValue), &err) == expect, message + strprintf(" (with flags %x)", combined_flags));
180180
}
181181

182-
#if defined(HAVE_CONSENSUS_LIB)
182+
#if HAVE_CONSENSUS_LIB
183183
CDataStream stream(SER_NETWORK, PROTOCOL_VERSION);
184184
stream << tx2;
185185
int libconsensus_flags = flags & bitcoinconsensus_SCRIPT_FLAGS_VERIFY_ALL;
@@ -1521,7 +1521,7 @@ BOOST_AUTO_TEST_CASE(script_can_append_self)
15211521
}
15221522

15231523

1524-
#if defined(HAVE_CONSENSUS_LIB)
1524+
#if HAVE_CONSENSUS_LIB
15251525

15261526
/* Test simple (successful) usage of bitcoinconsensus_verify_script */
15271527
BOOST_AUTO_TEST_CASE(bitcoinconsensus_verify_script_returns_true)

0 commit comments

Comments
 (0)