[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 05/17] dfa, grep: cleanup if-before-free and cast-of-argument
Re: [PATCH 05/17] dfa, grep: cleanup if-before-free and cast-of-argument-to-free
Sat, 13 Mar 2010 22:42:25 +0100
Aharon Robbins wrote:
> I'm not happy with removing the null checks in calls to free(); there
> were systems out there that would throw a fatal error if you passed
> null to free(). I'd prefer to leave those checks in.
The key word there is "were".
Such systems are no longer relevant. The last one,
SunOS4, dropped off the "reasonable porting target" list
at least 5 years ago. There is plenty of evidence that this
transformation is completely safe:
If, despite all that, you insist, I suggest that you interpose a
gnulib-style wrapper that does the right thing on losing systems
without polluting the code or penalizing users of all modern systems.