Needless pointer-casts in C

前端 未结 12 729
刺人心
刺人心 2020-12-09 10:05

I got a comment to my answer on this thread:

Malloc inside a function call appears to be getting freed on return?

In short I had code like this:



        
12条回答
  •  感动是毒
    2020-12-09 10:58

    Well, I think it's the exact opposite - always directly cast it to the needed type. Read on here!

提交回复
热议问题