https://k5wiki.kerberos.org/wiki?title=Talk:Coding_style&feed=atom&action=historyTalk:Coding style - Revision history2024-03-28T15:34:03ZRevision history for this page on the wikiMediaWiki 1.27.4https://k5wiki.kerberos.org/wiki?title=Talk:Coding_style&diff=343&oldid=prevKenRaeburn: New page: I think the bits about not passing NULL to realloc or free are obsolete. So is allowing K&R style function declarations or definitions in new code instead of using prototype style. Using...2008-04-14T23:51:44Z<p>New page: I think the bits about not passing NULL to realloc or free are obsolete. So is allowing K&R style function declarations or definitions in new code instead of using prototype style. Using...</p>
<p><b>New page</b></p><div>I think the bits about not passing NULL to realloc or free are obsolete. So is allowing K&R style function declarations or definitions in new code instead of using prototype style.<br />
<br />
Using calloc or memset with pointer fields isn't so much wrong as incomplete. It's probably reasonable to clobber whatever might have been there before (unless we've got ''good'' tools for tracking uninitialized storage, and we think we meant to initialize everything), it just isn't guaranteed to give you null pointers, so if you want pointers initialized to null, you should do that also, explicitly.<br />
<br />
--[[User:KenRaeburn|KenRaeburn]] 19:51, 14 April 2008 (EDT)</div>KenRaeburn