Complete.Org:
Mailing Lists:
Archives:
freeciv-dev:
August 2001: [Freeciv-Dev] Re: [patches] freeing NULL ptrs |
[Freeciv-Dev] Re: [patches] freeing NULL ptrs[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
More of the same. All these patches can also be grabbed from http://opus.dulug.duke.edu/~justin/public/FreeCiv/ > > PS. Would it be worth it to create a fc_free that ignores all NULL > > pointers passed to it? > > Probably. It might be helpful, too, to have that same function > assert(ptr != NULL) first if compiled with debugging turned on, so > that any instances where the code tries to free a NULL can be tracked > down and, if necessary, fixed. The patch defining this function is included. It'll be quite a series of patches to switch everyone from using free() to fc_free(), though. :) -jdm Department of Computer Science, Duke University, Durham, NC 27708-0129 Email: justin@xxxxxxxxxxx
unittype-free-1.12.0.patch
mem.h-1.12.0.patch
mem.c-1.12.0.patch
|