Dave Korn <dave.korn.cyg...@gmail.com> writes:

> On 29/05/2010 01:14, Ian Lance Taylor wrote:
>> Dave Korn <dave.korn.cygwin@ writes:
>
>>>   there is *no* circumstances
>>> under which ignoring the return from *any* function is *always* a bug.
>
>> For practical purposes, it is always a bug to ignore the return value
>> of realloc (I disregard the unusual case of passing 0 as the second
>> argument in order to free the memory block).
>
>   Also the case of calling it for a size that is known a priori to be less
> than the original size of the block!

Depending on the implementation it may be necessary to relocate the
block even in this case.

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."

Reply via email to