Skip to content

Commit a7038d6

Browse files
maxkozlovskyjhunsaker
authored andcommitted
Remove some redundant asserts
Second assert after bitmask is always true because of the first one and not necessary. Assertion for memory accessible is not necessary, memory will be accessed by constructor.
1 parent 57c93ee commit a7038d6

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

category/async/erased_connected_operation.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,6 @@ class erased_connected_operation
434434
static constexpr file_offset_t max_key = (1ULL << 63) - 1;
435435
MONAD_ASSERT(v <= max_key);
436436
n->key = v & max_key;
437-
MONAD_ASSERT(n->key == v);
438437
}
439438

440439
static erased_connected_operation *
@@ -483,7 +482,6 @@ class erased_connected_operation
483482
static constexpr file_offset_t max_key = (1ULL << 63) - 1;
484483
MONAD_ASSERT(v <= max_key);
485484
n->rbtree_.key = v & max_key;
486-
MONAD_ASSERT(n->rbtree_.key == v);
487485
}
488486

489487
static node_ptr to_node_ptr(erased_connected_operation *n)

category/async/io.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,6 @@ class AsyncIO final
508508
connected_operation_storage_pool_, 1);
509509
MONAD_ASSERT_PRINTF(
510510
mem != nullptr, "failed due to %s", strerror(errno));
511-
MONAD_ASSERT(((void)mem[0], true));
512511
auto ret = std::unique_ptr<
513512
connected_type,
514513
io_connected_operation_unique_ptr_deleter>(

0 commit comments

Comments
 (0)