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

[tor-bugs] #10046 [Analysis]: tor-0.2.3.25/src/or/transports.c:330: possible bad assert ?



#10046: tor-0.2.3.25/src/or/transports.c:330: possible bad assert ?
----------------------+------------------------------------
 Reporter:  dcb       |          Owner:
     Type:  defect    |         Status:  new
 Priority:  normal    |      Milestone:  Tor: 0.2.5.x-final
Component:  Analysis  |        Version:
 Keywords:            |  Actual Points:
Parent ID:            |         Points:
----------------------+------------------------------------
 I just tried to compile tor-0.2.3.25 with Linux gcc compiler flag
 -Wlogical-op

 It said

 transports.c:330:5: warning: logical 'or' of collectively exhaustive tests
 is always true [-Wlogical-op]

 Source code is

     tor_assert(mp->conf_state != PT_PROTO_BROKEN ||
                mp->conf_state != PT_PROTO_FAILED_LAUNCH);

 Suggest swap || for &&

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