Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 29 Jan 2002 14:15:43 -0800 (PST)
From:      chuck rouillard <chuckr@opus.sandiegoca.ncr.com>
To:        "Jacques A. Vidrine" <n@nectar.cc>
Cc:        FreeBSD-Standards <freebsd-standards@freebsd.org>
Subject:   Re: pathchk
Message-ID:  <20020129135626.P92533-100000@opus.sandiegoca.ncr.com>
In-Reply-To: <20020129210829.GC50337@madman.nectar.cc>

next in thread | previous in thread | raw e-mail | index | archive | help

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 <n@nectar.cc>                 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020129135626.P92533-100000>