I\'ve seen a lot of the following in older C code:
type_t *x = (type_t *) malloc(...);
What\'s the point of casting the pointer returned fr
What's the point of casting the pointer returned from malloc() since it's void *?
Quite the contrary. You need to cast a void pointer to an actual type before you can use it, because a void * signifies nothing about the data stored at that location.
void *