Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/lib/libc/gen



On Sun, Jun 05, 2005 at 01:00:13PM +1000, matthew green wrote:
  | 
  |    
  |    Module Name:     src
  |    Committed By:    lukem
  |    Date:            Sun Jun  5 01:15:29 UTC 2005
  |    
  |    Modified Files:
  |     src/lib/libc/gen: getpwent.c
  |    
  |    Log Message:
  |    Cosmetic tweak previous; IMHO we don't need the XXX comment in this
  |    case, since I prefer to NULL initialize variables in this situation.
  | 
  | why not?  it seems superfluous and GCC is wrong.

For code I've been maintaining (including getpwent.c), that's the
way I prefer to do it.  It helps identify obvious mistakes when
adding extra code blocks or debug messages; if you get a "(null)"
message printed it's fairly obvious that you haven't initialized
it when you should, as opposed to just getting random garbage
displayed.

Attachment: pgpzB1_zTj1Op.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index