httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: cvs commit: apache-2.0/src/main http_protocol.c
Date Mon, 09 Oct 2000 03:43:14 GMT
rbb@covalent.net wrote:
> 
> 
> > >            if ((toss = ap_strchr_c(temp, ASCII_LF)) != NULL) {
> > >                length = toss - temp + 1;
> > >   -            e->split(e, length + (temp[length] == 0));
> > >   +            e->split(e, length + (temp[length] == '\0' ? 1 : 0));
> > 
> > Bluch! == returns 0 or 1 already. The '\0' instead of 0 I agree with.
> 
> According to OtherBill, == can return -1 on some platforms.  I would much
> prefer to just use ==, because it is cleaner.  Can we leave it as is for
> today, because I am about to commit my fix for the char-at-a-time problem,
> and later today I am rolling an alpha.  Can we discuss/change this
> tomorrow?  I just want to get the alpha out today if at all possible.
> 

If the platform returns -1 for a '==' test, then it most definitely
is broken, and is non-ANSI. OB's point that any compiler worth
it's salt should optimize it out anyway is still valid. :)

I didn't feel grumpy enough to make any more out of it other than
my initial post :) :)

-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
                "Are you suggesting coconuts migrate??"

Mime
View raw message