httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: cvs commit: httpd-2.0/server/mpm/prefork prefork.c
Date Mon, 08 Jan 2001 22:31:59 GMT
Jeff Trawick wrote:
> 
> 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".)

??? How can they generate the same code? One runs until it hits NUL, the
other for a certain number of bytes!

Cheers,

Ben.

--
http://www.apache-ssl.org/ben.html

"There is no limit to what a man can do or how far he can go if he
doesn't mind who gets the credit." - Robert Woodruff

Mime
View raw message