From owner-cvs-all Thu Apr 4 16:19:17 2002 Delivered-To: cvs-all@freebsd.org Received: from aldan.algebra.com (aldan.algebra.com [216.254.65.224]) by hub.freebsd.org (Postfix) with ESMTP id 7793237B42F; Thu, 4 Apr 2002 16:18:40 -0800 (PST) Received: from aldan.algebra.com (localhost [127.0.0.1]) by aldan.algebra.com (8.12.2/8.12.2) with ESMTP id g350HvnF007641; Thu, 4 Apr 2002 19:18:03 -0500 (EST) (envelope-from mi@aldan.algebra.com) Message-Id: <200204050018.g350HvnF007641@aldan.algebra.com> Date: Thu, 4 Apr 2002 19:17:57 -0500 (EST) From: Mikhail Teterin Subject: Re: cvs commit: src/usr.bin/yacc main.c To: obrien@FreeBSD.org Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org In-Reply-To: <20020404152029.A81900@dragon.nuxi.com> MIME-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 4 Apr, David O'Brien wrote: > On Thu, Apr 04, 2002 at 05:43:50PM -0500, Mikhail Teterin wrote: >> > Use strlen() rather than magic number. >> [...] >> >> Beware of strlen :) The magic number was just a ``sizeof temp_form'' -- >> computed at the code-writing time. Your change moved the computation to >> run-time, which, IMHO, is too far. > > There is nothing wrong with run-time checks. Run-time checks make sense for the stuff that can not be determined at compile-time. If it can, the run-time check is a useless waste of CPU time and memory. I'm scared of the vision of countless thousands of computers calling strlen(temp_form) and constantly coming up with the same number -- 16. Are you not? > You are also missing the point which is to reduce differences with > *BSD, not add more. I know. But I'm talking to a FreeBSD developer. If the policy for a change is to convince some other BSD to make it first -- please, say so. -mi To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message