tidy: use nullptr in simplicity targets

This commit is contained in:
Byron Hambly 2025-02-17 10:52:31 +02:00
parent 25c864583a
commit ff888d5a2b
No known key found for this signature in database
GPG key ID: DE8F6EA20A661697
2 changed files with 3 additions and 3 deletions

View file

@ -204,11 +204,11 @@ FUZZ_TARGET_INIT(simplicity, initialize_simplicity)
PrecomputedTransactionData txdata{GENESIS_HASH};
std::vector<CTxOut> 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);

View file

@ -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};