[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [tor-bugs] #6520 [Tor Client]: read_from_old_location is set twice in router_reload_router_list_impl



#6520: read_from_old_location is set twice in router_reload_router_list_impl
-------------------------+--------------------------------------------------
 Reporter:  sysrqb       |          Owner:     
     Type:  enhancement  |         Status:  new
 Priority:  trivial      |      Milestone:     
Component:  Tor Client   |        Version:     
 Keywords:               |         Parent:     
   Points:               |   Actualpoints:     
-------------------------+--------------------------------------------------

Comment(by asn):

 Replying to [ticket:6520 sysrqb]:
 > The second mutation appears to exist so that the conditional above it
 can exist. Is there a reason to check the return value?
 >
 >     read_from_old_location = 1;
 >     log_notice(LD_DIR, "Couldn't read %s; trying to load routers from
 old "
 >                "location %s.", fname, altname);
 >     if ((store->mmap = tor_mmap_file(altname)))
 >       read_from_old_location = 1;

 Maybe the '''first'''
 {{{
      read_from_old_location = 1;
 }}}
 shouldn't be there? That is, `read_from_old_location` should only be true
 if the alternative file was successfully mmapped.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/6520#comment:1>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs