Opened 4 years ago

Closed 4 years ago

#19195 closed defect (fixed)

[prop250] Remove unnecessary assertion in sr_compute_srv

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: 0.2.9.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: tor-hs
Cc: Actual Points:
Parent ID: #16943 Points: 0.1
Reviewer: Sponsor:

Description

In dgoulet's srv-testing-2, git 0234595:

In sr_compute_srv, this doesn't make much sense:

uint64_t reveal_num;
...
tor_assert(reveal_num < UINT64_MAX);

Why stop reveal_num being equal to UINT64_MAX?
There's absolutely no harm in it being equal.

Let's just delete the condition.
(Or provide a comment saying why we're checking.)

Child Tickets

Change History (1)

comment:1 Changed 4 years ago by dgoulet

Resolution: fixed
Status: newclosed

Indeed, that's useless. It's a artifact of the past when reveal_num was a size_t but we expected a INT_1 so that assert was added but now it's useless.

Fixed and pushed in the main prop250 branch in #16943.

Note: See TracTickets for help on using tickets.