[tor-bugs] #24337 [Core Tor/Tor]: Every _free() function should be a macro that sets the corresponding pointer to NULL.

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Dec 1 16:08:38 UTC 2017


#24337: Every _free() function should be a macro that sets the corresponding
pointer to NULL.
-----------------------------+------------------------------------
 Reporter:  nickm            |          Owner:  nickm
     Type:  enhancement      |         Status:  needs_review
 Priority:  Medium           |      Milestone:  Tor: 0.3.3.x-final
Component:  Core Tor/Tor     |        Version:
 Severity:  Normal           |     Resolution:
 Keywords:  review-group-26  |  Actual Points:
Parent ID:                   |         Points:
 Reviewer:                   |        Sponsor:  Sponsor8-can
-----------------------------+------------------------------------

Comment (by Hello71):

 I support uppercase for all macros. Even for long-time contributors that
 know tor_free is a macro, it increases cognitive overhead unnecessarily.
 In the absence of strong overriding factors, like "C does not support
 this", the code should be as easy to read as possible, with syntactic
 sugar that is as transparent as possible, without having to keep some
 extra thing in mind. A small thing, I agree, but death by a thousand cuts.

 tl;dr even oldies can use a reminder

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


More information about the tor-bugs mailing list