Skip to content

Commit

Permalink
Style.
Browse files Browse the repository at this point in the history
  • Loading branch information
evoskuil committed Jan 30, 2025
1 parent bc9783d commit 4353287
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/net/distributor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ constexpr bool use_block_allocator = true;
namespace libbitcoin {
namespace network {

// Compiler can't see is_null(arena).
BC_PUSH_WARNING(NO_UNGUARDED_POINTERS)

using namespace system;

#define SUBSCRIBER(name) name##_subscriber_
Expand Down Expand Up @@ -168,7 +171,7 @@ code distributor::do_notify<messages::block>(
if constexpr (use_block_allocator)
{
const auto arena = memory_.get_arena();
if (arena == nullptr)
if (is_null(arena))
return error::operation_failed;

const auto ptr = messages::block::deserialize(*arena, version, data);
Expand All @@ -182,8 +185,11 @@ code distributor::do_notify<messages::block>(
{
return do_notify<messages::block>(subscriber, version, data);
}

}

BC_POP_WARNING()

#undef SUBSCRIBER
#undef MAKE_SUBSCRIBER
#undef CASE_NOTIFY
Expand Down

0 comments on commit 4353287

Please sign in to comment.