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

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



#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 dgoulet):

 Right. The "change the local value" is the part that is making it stand
 out as a "function". But having it upper case won't help much of making
 new developers realize it "could do" something like that imo... It might
 maybe motivate them to go look at the macro?...

 TBH, I personally don't see that as a "problem" for new developers, as
 long as we document it properly. But also, every `tor_*` function, any
 developer should look at them when they use them because we do wrappers
 for safety and/or compatibility reasons which imo MUST be known to any
 developers.

 We could help new developers by adding a note to our HACKING/
 documentation on "if you use tor_*, please go read them" kind of
 statement.

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