%% Peter Eisentraut <[EMAIL PROTECTED]> writes:
pe> "Working" is a fairly volatile term. free() "works" if it frees
pe> memory. If it doesn't grok null pointers, that's an unfortunate
pe> circumstance but not necessarily "not working" by all standards.
Actually, not so. All the C standards require that free()'ing a null
pointer be well-behaved (essentially a no-op).
Similar for realloc(); the standard requires that if you provide it a null
pointer as a first argument, it behave just like malloc().
But, you're right that a number of older platforms don't actually
implement that and it's probably not worth the hassle of trying to code
to it with autoconf macros, vs. just avoiding the situation.
I mean, how can you test whether "free(0)" did the right thing, or
corrupted your heap?
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Network Management Development
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
-------------------------------------------------------------------------------
These are my opinions---Nortel Networks takes no responsibility for them.