I was just reading about the bad practice of casting the return value of malloc. If I understood correctly, it is absolutely legal to leave the cast as it is do
malloc
My simple guideline - if it needs a cast, it's probably wrong. If you don't need a cast, don't use them.