bug-grep
[Top][All Lists]
Advanced

[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


From: Jim Meyering
Subject: Re: [PATCH 05/17] dfa, grep: cleanup if-before-free and cast-of-argument-to-free
Date: 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.

Hi Arnold,

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:

    http://lkml.indiana.edu/hypermail/linux/kernel/0808.2/3436.html

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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]