Hacker News new | ask | show | jobs
by jpr 5571 days ago
Casting malloc's return value in C is

a) not necessary

b) a bad idea, because if you forget to include stdlib.h the compiler won't warn you since it assumes that you know what you are doing when you cast an int (the default return type) to whatever pointer type it is.