[tor-bugs] #15176 [Tor]: Refactor main loop for Shadow

Tor Bug Tracker & Wiki blackhole at torproject.org
Wed Mar 18 12:49:23 UTC 2015


#15176: Refactor main loop for Shadow
-----------------------------+--------------------------------
     Reporter:  robgjansen   |      Owner:
         Type:  enhancement  |     Status:  needs_review
     Priority:  normal       |  Milestone:  Tor: 0.2.6.x-final
    Component:  Tor          |    Version:
   Resolution:               |   Keywords:  shadow-wants
Actual Points:               |  Parent ID:
       Points:               |
-----------------------------+--------------------------------

Comment (by yawning):

 Per IRC, both dgoulet and I think that this would be a good idea for
 0.2.6.x. if it is trivial.  (Supporting the research community is a Good
 Thing(TM)).

  * b78803f9f543c83bf50d0751eb160e80ed602eae "Extract main part of main
 loop into a separate function"
    Trivial refactor, ACK.

  * 92d04721a2a614e40d6393ccc64ff2e86b71d778 "remove a needless "if (1)"
 that was there for indentation; fix indentation."
    Formating change, removing a conditional that would be optimized out
 anyway, ACK.

  * ddb1889eb8bc128ec0fca35f15b1bf90d2b629ac "Add comments for new
 functions"
    Documentation change, ACK.  (Remove the newline after the first "/**"
 maybe).

  * a0f892f19094efd963564cf788be887f694be796 "Simplify the loop."
    Trivial change, ACK. (Since you're initializing `loop_result` at
 declaration time you could use a while loop instead of do/while, but
 that's a stylistic thing).

 ACK, minor nitpicks that are a matter of personal taste.  I'd say it's ok
 for 0.2.6.x.

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


More information about the tor-bugs mailing list