[tor-bugs] #13172 [Tor]: Stop using operators as macro arguments ?

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Sep 16 13:59:15 UTC 2014


#13172: Stop using operators as macro arguments ?
--------------------+------------------------------------
 Reporter:  nickm   |          Owner:
     Type:  defect  |         Status:  new
 Priority:  normal  |      Milestone:  Tor: 0.2.6.x-final
Component:  Tor     |        Version:
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
--------------------+------------------------------------
 The "coccinelle" semantic patch tool really gets confused when we use
 operators as macro arguments.  It can't modify any function that does
 that.  We use operators as macro arguments in two ways:

  1. We pass them to timercmp.

  2. We pass them as arguments to our tt_*_op() macros.

 It's pretty trivial to make this change: We just need to add "#define LT
 <" and so forth, and then we can use a perl script ro replace "<," and
 "<)" with "LT". Then so on for GT, EQ, NEQ, GEQ, LEQ.

 Is this worthwhile?

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


More information about the tor-bugs mailing list