Alexandre Ratchov wrote: > On Thu, Nov 12, 2015 at 02:52:01PM +0800, Michael W. Bombardieri wrote: > > > > ok for removing xfree from aucat? > > > > > > yes, ok ratchov; if later this causes me merges i'll find another > > > solution. Feel free to do the same in usr.bin/sndiod, as it's > > > almost the same. > > > > Same thing for sndiod... > > ok to replace xfree->free. But I'd like to keep this constructs: > > if (ptr != NULL) > free(ptr); > > the reason is that sometimes i add printf()s or additional code when > needed, so i don't want to loose the condition.
Its long been protocol to remove this wherever we find it. POSIX specifies that free() is NULL-safe, and removing the conditions can greatly improve readability. IMO, this is another instance where a macro and (Coccinelle|cscope|sed|awk) is your best bet.