Skip to content

Commit 489dae9

Browse files
authored
Merge pull request #1593 from evoskuil/master
Consensus: fix tautological negative guards.
2 parents d6c2643 + d481d5f commit 489dae9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/bitcoin/system/impl/machine/program.ipp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ peek_unsigned32(uint32_t& value) const NOEXCEPT
430430
return false;
431431

432432
int64_t signed64;
433-
if (!peek_signed40_(signed64) || is_negative(value))
433+
if (!peek_signed40_(signed64) || is_negative(signed64))
434434
return false;
435435

436436
// 32 bits are used in unsigned input.sequence compare.
@@ -441,7 +441,7 @@ peek_unsigned32(uint32_t& value) const NOEXCEPT
441441
// ****************************************************************************
442442
// CONSENSUS: Read of 40 bit (vs. 32 bit) value for comparison against uint32_t
443443
// input.locktime allows use of the full unsigned 32 bit domain, without use of
444-
// the negative range. Otherwise a 2038 limit (beyond the inherent 2106 limit)
444+
// the negative range. Otherwise a 2038 limit (vs. the inherent 2106 limit)
445445
// would have been introduced.
446446
// ****************************************************************************
447447
template <typename Stack>
@@ -452,7 +452,7 @@ peek_unsigned40(uint64_t& value) const NOEXCEPT
452452
return false;
453453

454454
int64_t signed64;
455-
if (!peek_signed40_(signed64) || is_negative(value))
455+
if (!peek_signed40_(signed64) || is_negative(signed64))
456456
return false;
457457

458458
// 40 bits are usable in unsigned tx.locktime compare.

0 commit comments

Comments
 (0)