[tor-bugs] #3456 [Tor Client]: Flags in cpath_build_state_t should be one-bit bitfields, not ints

Tor Bug Tracker & Wiki torproject-admin at torproject.org
Fri Jun 24 18:18:17 UTC 2011


#3456: Flags in cpath_build_state_t should be one-bit bitfields, not ints
------------------------+---------------------------------------------------
 Reporter:  rransom     |          Owner:  rransom           
     Type:  defect      |         Status:  new               
 Priority:  trivial     |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------
 {{{

   /** Whether every node in the circ must have adequate uptime. */
   int need_uptime;
   /** Whether every node in the circ must have adequate capacity. */
   int need_capacity;
   /** Whether the last hop was picked with exiting in mind. */
   int is_internal;
   /** Did we pick this as a one-hop tunnel (not safe for other conns)?
    * These are for encrypted connections that exit to this router, not
    * for arbitrary exits from the circuit. */
   int onehop_tunnel;
 }}}

 `unsigned int foo : 1;` would be more appropriate here.

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


More information about the tor-bugs mailing list