From owner-freebsd-standards Tue Jan 29 14:11:50 2002 Delivered-To: freebsd-standards@freebsd.org Received: from opus.sandiegoca.ncr.com (tan7.ncr.com [192.127.94.7]) by hub.freebsd.org (Postfix) with ESMTP id 14D7C37B402 for ; Tue, 29 Jan 2002 14:11:47 -0800 (PST) Received: from localhost (chuckr@localhost) by opus.sandiegoca.ncr.com (8.11.6/8.11.6) with ESMTP id g0TMFhF92556; Tue, 29 Jan 2002 14:15:44 -0800 (PST) (envelope-from chuckr@opus.sandiegoca.ncr.com) Date: Tue, 29 Jan 2002 14:15:43 -0800 (PST) From: chuck rouillard To: "Jacques A. Vidrine" Cc: FreeBSD-Standards Subject: Re: pathchk In-Reply-To: <20020129210829.GC50337@madman.nectar.cc> Message-ID: <20020129135626.P92533-100000@opus.sandiegoca.ncr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Tue, 29 Jan 2002, Jacques A. Vidrine wrote: > On Tue, Jan 29, 2002 at 11:55:46AM -0800, chuck rouillard wrote: > > My implementation of pathchk for review. Note that > > it handles the illegal filesystem access of /proc, > > the case where `/'^n is specified, and others. > > A quick look at the code turns up: > > = sizeof(char) is defined to be 1. Agreed. > = use of calloc appears to be redundant. I'm not sure what you mean here, but I'll take a look. > = some operations are out of order: memory allocations or made or > memory is written even after it is demonstrable that the path name > or component is too long. I'll take a closer look at this. At the very least, a comment of justification may be in order. 8-) > also, in a `||' construction, do the least expensive operation first. Yes, that's an oversight. :-) > = the arguments are modified. while not strictly an error, it is not > nice. > = it would be nicer if errno were explicitly passed to pe() Agreed. > > Otherwise it's looking good! Thanks for your time; it's appreciated. I'll fix these issues and pass them back soon. .cr > Cheers, > -- > Jacques A. Vidrine http://www.nectar.cc/ > NTT/Verio SME . FreeBSD UNIX . Heimdal Kerberos > jvidrine@verio.net . nectar@FreeBSD.org . nectar@kth.se To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message