From ff888d5a2bc8b0a1afd6198277395a91c5effce8 Mon Sep 17 00:00:00 2001 From: Byron Hambly Date: Mon, 17 Feb 2025 10:52:31 +0200 Subject: [PATCH] tidy: use nullptr in simplicity targets --- src/test/fuzz/simplicity.cpp | 4 ++-- src/test/fuzz/simplicity_tx.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/test/fuzz/simplicity.cpp b/src/test/fuzz/simplicity.cpp index 02644e6990..6dfc907d46 100644 --- a/src/test/fuzz/simplicity.cpp +++ b/src/test/fuzz/simplicity.cpp @@ -204,11 +204,11 @@ FUZZ_TARGET_INIT(simplicity, initialize_simplicity) PrecomputedTransactionData txdata{GENESIS_HASH}; std::vector spent_outs_copy{spent_outs}; txdata.Init(mtx, std::move(spent_outs_copy)); - assert(txdata.m_simplicity_tx_data != NULL); + assert(txdata.m_simplicity_tx_data != nullptr); // 4. Main test unsigned char imr_out[32]; - unsigned char *imr = mtx.vin[0].prevout.hash.data()[2] & 2 ? imr_out : NULL; + unsigned char *imr = mtx.vin[0].prevout.hash.data()[2] & 2 ? imr_out : nullptr; const transaction* tx = txdata.m_simplicity_tx_data; tapEnv* taproot = simplicity_elements_mallocTapEnv(&simplicityRawTap); diff --git a/src/test/fuzz/simplicity_tx.cpp b/src/test/fuzz/simplicity_tx.cpp index 15d987f4c9..beb8d39aff 100644 --- a/src/test/fuzz/simplicity_tx.cpp +++ b/src/test/fuzz/simplicity_tx.cpp @@ -218,7 +218,7 @@ FUZZ_TARGET_INIT(simplicity_tx, initialize_simplicity_tx) // that we will allocate Simplicity data. The check for whether to do this is very // lax: is this a 34-byte scriptPubKey that starts with OP_1 and does it have a // nonempty witness. - assert(txdata.m_simplicity_tx_data != NULL); + assert(txdata.m_simplicity_tx_data != nullptr); } const CTransaction tx{mtx};