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

Re: [tor-bugs] #4637 [Tor Client]: Two coverity deadcode issues



#4637: Two coverity deadcode issues
------------------------+---------------------------------------------------
 Reporter:  Sebastian   |          Owner:                    
     Type:  defect      |         Status:  needs_review      
 Priority:  normal      |      Milestone:  Tor: 0.2.3.x-final
Component:  Tor Client  |        Version:                    
 Keywords:              |         Parent:                    
   Points:              |   Actualpoints:                    
------------------------+---------------------------------------------------

Comment(by Sebastian):

 No, that's not it. Just a couple of lines before all the checks, we have
 an explicit check already:

 {{{
    if (G <= 0 || M <= 0 || E <= 0 || D <= 0) {
      log_warn(LD_DIR, "Consensus with empty bandwidth: "
                       "G="I64_FORMAT" M="I64_FORMAT" E="I64_FORMAT
                       " D="I64_FORMAT" T="I64_FORMAT,
               I64_PRINTF_ARG(G), I64_PRINTF_ARG(M), I64_PRINTF_ARG(E),
               I64_PRINTF_ARG(D), I64_PRINTF_ARG(T));
      return;
    }
 }}}

 This check was introduced after the explicit checks for 0 were already
 there, and they just weren't removed.

-- 
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/4637#comment:5>
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