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. :-)
|