[tor-bugs] #31074 [Core Tor/Tor]: Use tor_queue.h macros in config_line_t

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Jul 3 22:22:32 UTC 2019


#31074: Use tor_queue.h macros in config_line_t
--------------------------------------+----------------------------------
 Reporter:  nickm                     |          Owner:  (none)
     Type:  defect                    |         Status:  new
 Priority:  Low                       |      Milestone:  Tor: unspecified
Component:  Core Tor/Tor              |        Version:
 Severity:  Normal                    |     Resolution:
 Keywords:  refactor teschnical-debt  |  Actual Points:
Parent ID:                            |         Points:  1
 Reviewer:                            |        Sponsor:  Sponsor31-can
--------------------------------------+----------------------------------

Comment (by catalyst):

 Replying to [ticket:31074 nickm]:
 > The config_line_t linked list could be refactored to use the TOR_SLIST
 macros in tor_queue.h
 I would suggest using the `TOR_SIMPLEQ` macros instead. There are places
 where it would be helpful to have an O(1) append.
 (`config_get_lines_aux()` explicitly works around this by temporarily
 creating a `list_last` pointer and mentions O(n^2^) performance as an
 issue.)

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/31074#comment:2>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list