View Single Post
Old 01-24-2004, 02:34 AM   #15
 
Posts: n/a
Don't sweat it.  Kerningham and Ritchie cast malloc to char* or whatever they needed all the time.  Didn't they invent C? ;-)

I also cast malloc consistently from void* to whatever when programming in C.  Of course I always include stdlib.h  

Kastagar is correct that it ain't necessary at all.

So why do I do it?  I think it makes the code a bit clearer.  And well it's a habit.  :-)
  Reply With Quote