[Discuss] Casting the return value of malloc bad?

Adam Parkin pzelnip at telus.net
Tue Jul 11 22:46:34 PDT 2006


Okay a question for the C gurus on the list: I've heard from a few 
people that casting the return value from malloc is bad practice, is 
this true, and if so, why?  And more importantly, if it is bad practice, 
then what is a better practice (and why)?

--
Adam Parkin
E-mail: pzelnip at telus.net
----------------------
To an optimist the glass is half-full.
To a pessimist the glass is half-empty.
To a computer scientist the glass is twice as big as it needs to be.



More information about the Discuss mailing list