Date: Fri, 27 Jul 2001 21:44:54 -0700 From: "David O'Brien" <obrien@FreeBSD.org> To: Kris Kennaway <kris@obsecurity.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.sbin/pkg_install/add main.c src/usr.sbin/pkg_install/lib str.c Message-ID: <20010727214454.A96927@dragon.nuxi.com> In-Reply-To: <20010727204037.A58795@xor.obsecurity.org>; from kris@obsecurity.org on Fri, Jul 27, 2001 at 08:40:37PM -0700 References: <200107280159.f6S1xw810069@freefall.freebsd.org> <20010727204037.A58795@xor.obsecurity.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jul 27, 2001 at 08:40:37PM -0700, Kris Kennaway wrote:
> > Modified files:
> > usr.sbin/pkg_install/add main.c
> > usr.sbin/pkg_install/lib str.c
> > Log:
> > Remove s_strl*(). I am not sure what was thought they accomplished.
>
> Grr. Thanks for discussing this with me (the person who added
> s_strl*).
>
> I'm not happy with this commit: I don't like endless
> amounts of inline code duplication when a simple function can do the
> job.
You have a weird definition of "endless amounts of code duplication".
With your position, what do you call the errx() after every s_strl* call
then? Why didn't you fold that into s_strl*? If s_strl* contained that
then maybe you'd have an argument about code duplication.
Do you understand how compilers generate code? Have you ever written a
compiler? Do you know how optimizers work? Have you ever taken a
graduate code optimization course? Do you have any code in a widely used
compiler? Done any graduate work on processor architecture?
before
$ size add/pkg_add
text data bss dec hex filename
36331 728 29488 66547 103f3 add/pkg_add (i386)
48380 4448 29080 81908 13ff4 add/pkg_add (alpha)
after
$ size add/pkg_add
text data bss dec hex filename
36295 728 29488 66511 103cf add/pkg_add (i386)
48319 4432 29080 81831 13fa7 add/pkg_add (alpha)
> Please back this out until we can come to an agreement.
What part of my explanation for the commit do you disagree with?
I also showed the code before my commit and after my commit to some
coworkers. They agreed my version improved the clarity.
--
-- David (obrien@FreeBSD.org)
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010727214454.A96927>
