Source-Changes archive

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

Re: CVS commit: src/usr.bin/whois



On Thu, Oct 16, 2003 at 07:52:42PM +0200, Lennart Augustsson wrote:
> Yes, indeed.  GCC even produces identical code before and after the
> "fix".  Why are these pointless changes done?

Uhm, while I agree that many changes for change's sake are bad, this 
change seems reasonable to me. At least in principle (if on error we exit 
the program, maybe not).

Whenever you realloc(), I've always found it safest to realloc to a temp 
variable, then if there's an error, you still have the original pointer.

Note that server is declared static, so it will stick around, no? Thus if 
GCC is producing the same code, it's doing something wrong. Either it's 
storing when it shouldn't now, or before it wasn't storing when it should.

Take care,

Bill

Attachment: pgpO3waDgclCj.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index