Opened 6 months ago

Closed 6 months ago

#25645 closed defect (fixed)

n_possible variable goes unused in channel_get_for_extend()

Reported by: arma Owned by:
Priority: Medium Milestone: Tor: 0.3.4.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords: easy, tor-channel
Cc: Actual Points:
Parent ID: Points:
Reviewer: dgoulet Sponsor:

Description

$ grep n_possible *.c
channel.c:  int n_noncanonical = 0, n_possible = 0;
channel.c:    ++n_possible;

All we do is start it off at 0, and increment it sometimes.

Maybe it had a purpose once, but it doesn't anymore.

Child Tickets

Change History (5)

comment:1 Changed 6 months ago by dgoulet

Keywords: tor-channel added
Milestone: Tor: unspecified

Seems to be coming from this HUMONGOUS commit: 838743654c1 and even at that commit, it isn't used in the function.

We can safely remove this.

comment:2 Changed 6 months ago by fristonio

Hey,

Here is a patch for this https://github.com/fristonio/tor/tree/ticket-25645
There is indeed no need of the variable n_possible in the function, I have tested the patch locally.

comment:3 Changed 6 months ago by teor

Milestone: Tor: unspecifiedTor: 0.3.4.x-final
Status: newneeds_review

comment:4 Changed 6 months ago by dgoulet

Reviewer: dgoulet
Status: needs_reviewmerge_ready

ack.

comment:5 Changed 6 months ago by nickm

Resolution: fixed
Status: merge_readyclosed

merging!

Note: See TracTickets for help on using tickets.