From owner-freebsd-hackers Mon Jul 30 8:46:58 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from winston.freebsd.org (adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by hub.freebsd.org (Postfix) with ESMTP id 192BC37B403; Mon, 30 Jul 2001 08:46:51 -0700 (PDT) (envelope-from jkh@freebsd.org) Received: from localhost (jkh@localhost [127.0.0.1]) by winston.freebsd.org (8.11.4/8.11.4) with ESMTP id f6UFk1t32478; Mon, 30 Jul 2001 08:46:02 -0700 (PDT) (envelope-from 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 In-Reply-To: <20010727214412.A91434@dragon.nuxi.com> References: <20010727214412.A91434@dragon.nuxi.com> X-Mailer: Mew version 1.94.1 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010730084601N.jkh@freebsd.org> Date: Mon, 30 Jul 2001 08:46:01 -0700 From: Jordan Hubbard X-Dispatcher: imput version 20000228(IM140) Lines: 19 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG From: "David O'Brien" 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