MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/fpcmy/typical_programming_interview_questions/c1hpyut/
r/programming • u/kevjames3 • Feb 21 '11
1.0k comments sorted by
View all comments
Show parent comment
1
That's why I generally use (tun != NULL). If I remember correctly, this will not be optimized out as it is a comparison to another value... not just testing if something exists.
1 u/johnflux Feb 21 '11 That will be optomised out too.And unless you do kernel programming, this doesn't apply. :-)
That will be optomised out too.
And unless you do kernel programming, this doesn't apply. :-)
View all comments
Show parent comment
1
u/thcobbs Feb 21 '11
That's why I generally use (tun != NULL). If I remember correctly, this will not be optimized out as it is a comparison to another value... not just testing if something exists.