Opened 4 months ago

Closed 4 months ago

Last modified 4 months ago

#32187 closed defect (fixed)

Clean up options_validate() interface

Reported by: nickm Owned by: nickm
Priority: Medium Milestone: Tor: 0.4.3.x-final
Component: Core Tor/Tor Version:
Severity: Normal Keywords:
Cc: nickm, teor Actual Points: .1
Parent ID: #31241 Points: .3
Reviewer: teor Sponsor: Sponsor31-can

Description

There are now two unused arguments in options_validate(), and one or two more that should be const. I'd like to take care of this after #31285, and before returning to the parent ticket.

Giving a slightly high points estimate since I anticipate a certain amount of coccinelle wrangling to clean up the call sites.

Child Tickets

Change History (6)

comment:1 Changed 4 months ago by nickm

Actual Points: .1
Reviewer: teor

Cocci was easier than expected. ticket32187 was the branch; https://github.com/torproject/tor/pull/1449 is the PR.

This is a relatively simple cleanup branch. I'll put in needs_review once the CI passes.

comment:2 Changed 4 months ago by nickm

Status: assignedneeds_review

Travis has passed; appveyor is being incredibly slow.

comment:3 in reply to:  2 Changed 4 months ago by teor

Replying to nickm:

Travis has passed; appveyor is being incredibly slow.

Appveyor is the same speed that it always was.
But Travis is much faster :-)

comment:4 Changed 4 months ago by nickm

(Now appveyor is done too.)

comment:5 Changed 4 months ago by teor

Resolution: fixed
Status: needs_reviewclosed

Seems fine, where will we make options const?

Merged to master.

comment:6 Changed 4 months ago by nickm

Seems fine, where will we make options const?

Making the "options" argument const will have to happen piece by piece. There are a bunch of places where we change it inside options_validate().

My plan here is: The parent ticket will change the behavior of the callbacks, so that the options argument is only non-const in a "legacy" verify callback. As we move verify logic into the new system, we can move pieces of it into non-legacy callbacks.

Note: See TracTickets for help on using tickets.