Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Aug 2001 20:39:14 -0400
From:      Mike Barcroft <mike@FreeBSD.org>
To:        Akinori MUSHA <knu@iDaemons.org>
Cc:        green@FreeBSD.org, audit@FreeBSD.org
Subject:   Re: adding -P option to pkg_delete(1)
Message-ID:  <20010812203914.C29363@coffee.q9media.com>
In-Reply-To: <86ofpl0yq8.wl@archon.local.idaemons.org>; from knu@iDaemons.org on Mon, Aug 13, 2001 at 06:12:15AM %2B0900
References:  <86elqphctp.wl@archon.local.idaemons.org> <86d761hijs.wl@archon.local.idaemons.org> <20010812140750.B29132@coffee.q9media.com> <86snex15o4.wl@archon.local.idaemons.org> <20010812164843.A29363@coffee.q9media.com> <86ofpl0yq8.wl@archon.local.idaemons.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 13, 2001 at 06:12:15AM +0900, Akinori MUSHA wrote:
> > Neither do I.  Mostly because you could be accessing memory before
> > filename starts.
> 
> No, no.  If (p - filename < 2) is false, the rest is not evaluated.
> It would be more than just "don't like" if the code had such a
> terrible flaw. ;)
> 
> The reason why I don't like it is because it goes to extremes for
> performance, to result in less readable, inflexible code.

I'm quite sure it has problems, it was just an example of how it could   
be achieved with traversing filename a half-dozen times.  But ofcourse 
Brian is correct, we should just use regex instead of trying to         
reinvent the wheel.
 
Best regards,
Mike Barcroft

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




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