[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: cvs commit: httpd-2.0/server request.c
From:       Justin Erenkrantz <jerenkrantz () ebuilt ! com>
Date:       2001-09-29 16:26:47
[Download RAW message or body]

On Sat, Sep 29, 2001 at 12:01:33PM -0400, Cliff Woolley wrote:
> On 29 Sep 2001 jerenkrantz@apache.org wrote:
> 
> >        if (strncmp(rnew->filename, fdir, fdirlen) == 0
> >               && rnew->filename[fdirlen]
> >   -           && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL)
> >   +           && ap_strchr_c(rnew->filename + fdirlen, '/') == NULL
> >   +           && strlen(r->uri) != 0)
> 
> Might I suggest "&& r->uri[0] != '\0'" or some such?  You don't really
> need the string's length, just whether it's zero or not.  Constant time
> instead of linear is always nice.  =-)

Ah, yes, that'd be better.  But, I have a feeling OtherBill will be
reverting it, so I won't muck anymore with it.  If he says it is
the right thing to do, then we can change it to that...  -- justin

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic