At 1:11 PM -0600 12/18/00, Jacques A. Vidrine wrote: >Ever notice that you tend to send more email when you should be >studying for a final? I did notice that I write very few letters now, compared to when I was in college and still facing exams/finals... > /* Case 1 */ /* Case 2 */ > if (data) vs. free(data) > free(data); > >I don't see that Case 1 obfuscates anything. In some cases >I find it clearer: Case 1 implies that maybe no memory was >allocated. Case 2 seems to imply that memory was indeed >allocated. For what it's worth, my preference is to also zero out 'data' after freeing it. I tend to do the 'if (data)' part, particularly if I'm also doing that test for other reasons. -- Garance Alistair Drosehn = [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Institute or [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the body of the message
- Re: Why not another style thread? (was Re: cvs commit:s... Chris Costello
- Re: Why not another style thread? (was Re: cvs com... Jacques A. Vidrine
- Re: Why not another style thread? (was Re: cvs... Chris Costello
- Re: Why not another style thread? (was Re:... Jacques A. Vidrine
- Re: Why not another style thread? (was Re:... Warner Losh
- Re: Why not another style thread? (was... Jacques A. Vidrine
- Re: Why not another style thread? (was... Jack Rusher
- Re: Why not another style thread? (was... Warner Losh
- Re: Why not another style thread? (was... Matt Dillon
- Re: Why not another style thread? (was... Jacques A. Vidrine
- Re: Why not another style thread? (was... Garance A Drosihn
- Re: Why not another style thread? (was... Drew Eckhardt
- Re: Why not another style thread? (was... David O'Brien
- Optimizations (was: Why not another st... Greg Lehey
- Re: Optimizations (was: Why not anothe... Peter Seebach
- Re: Optimizations (was: Why not anothe... Jacques A. Vidrine
- Re: Optimizations (was: Why not anothe... Matthew Jacob
- Re: Optimizations (was: Why not anothe... Luigi Rizzo
- Re: Optimizations (was: Why not anothe... Matt Dillon
- Re: Optimizations (was: Why not anothe... Matt Dillon
- Re: Optimizations (was: Why not anothe... Peter Seebach