Subject: Re: CVS commit: src/usr.bin/whois
To: Lennart Augustsson <lennart@augustsson.net>
From: Bill Studenmund <wrstuden@netbsd.org>
List: source-changes
Date: 10/16/2003 13:32:38
--AqsLC8rIMeq19msA
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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=20
change seems reasonable to me. At least in principle (if on error we exit=
=20
the program, maybe not).

Whenever you realloc(), I've always found it safest to realloc to a temp=20
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=
=20
GCC is producing the same code, it's doing something wrong. Either it's=20
storing when it shouldn't now, or before it wasn't storing when it should.

Take care,

Bill

--AqsLC8rIMeq19msA
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (NetBSD)

iD8DBQE/jwBmWz+3JHUci9cRAvS6AJ4yHEtZhAW5rdrOH7AkRkUR2wX/bQCfU+r4
bh40aX8CxhTj+w2HQu0y2cw=
=QWG4
-----END PGP SIGNATURE-----

--AqsLC8rIMeq19msA--