httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@covalent.net
Subject RE: cvs commit: apache-2.0/src/main http_protocol.c
Date Sun, 08 Oct 2000 23:20:05 GMT

Okay, I'm making that change now.

Ryan

On Sun, 8 Oct 2000, William A. Rowe, Jr. wrote:

> > From: Greg Stein [mailto:gstein@lyra.org]
> > Sent: Sunday, October 08, 2000 2:56 PM
> > 
> > On Sun, Oct 08, 2000 at 12:01:49PM -0700, rbb@covalent.net wrote:
> > >
> > > > >   +            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.
> > 
> > Untrue. At the machine language level, a conditional test may 
> > produce -1, but C produces 0 or 1. Always has.
> 
> Then I retract...  I was looking at code 20 minutes before I had
> to teach, my brain wasn't all here.  I have always avoided relying
> on a non-zero value being anything in particular, and has always
> been a -big-red-flag- in my book, and yes, Greg, I do asm :-)
> 
> But if we are most certain this is fully portable, you are welcome
> to eliminate the tertiary op and go back to plain ( == ).
> 
> Bill
> 


_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message