Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jul 2001 08:46:01 -0700
From:      Jordan Hubbard <jkh@freebsd.org>
To:        obrien@freebsd.org
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: [PATCH] reduce text(code) size and improve clarity of pkg_add
Message-ID:  <20010730084601N.jkh@freebsd.org>
In-Reply-To: <20010727214412.A91434@dragon.nuxi.com>
References:  <20010727214412.A91434@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
From: "David O'Brien" <obrien@FreeBSD.ORG>
Subject: [PATCH] reduce text(code) size and improve clarity of pkg_add
Date: Fri, 27 Jul 2001 21:44:12 -0700

> I'd like to apply this patch to pkg_add which reduces the amount of code
> the compiler generates, and improves the clarity of the code.

As the original author of this code, I'll just say that I favor
clarity over speed.  As long as you can achieve reasonable security
with whatever approach is used, I vote for the shortest one which has
the least number of private or otherwise "lesser known" functions
since that also obscures clarity.  Everybody knows [or should] what
strncpy() and friends do and the intention of code which uses them is
therefore pretty clear.  If we're lacking the appropriate functions
for doing safe string copies (which I find hard to believe) then we
ought to be arguing for extending the appropriate base library, not
adding them as private functions to pkg_install.  My two cents.

- Jordan

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010730084601N.jkh>