httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <trawi...@bellsouth.net>
Subject Re: cvs commit: httpd-2.0/server/mpm/prefork prefork.c
Date Mon, 08 Jan 2001 13:01:35 GMT
rbb@covalent.net writes:

> >    #define ASIS_MAGIC_TYPE "httpd/send-as-is"
> >    
> >   -static int asis_handler(request_rec *r)
> >   +static int asis_handler(const char *handler,request_rec *r)
> >    {
> >        apr_file_t *f = NULL;
> >        apr_status_t status;
> >        const char *location;
> >        apr_size_t nbytes;
> >    
> >   +    if(strcmp(handler,ASIS_MAGIC_TYPE) && strcmp(handler,"send-as-is"))
> >   +	return DECLINED;
> 
> Can we change the strcmp to a memcmp, since we know that these are static
> strings?

Is there a compiler which is known to generate worse code for strcmp()
than for memcmp() in this case?

(I'm not saying there isn't; I just know that there are some which
generate the same code.  Of course I'm speaking of compilers which
generate inline code for various strxxx() and memxxx() "functions".)

-- 
Jeff Trawick | trawickj@bellsouth.net | PGP public key at web site:
       http://www.geocities.com/SiliconValley/Park/9289/
             Born in Roswell... married an alien...

Mime
View raw message