httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <>
Subject Re: bogus change to proxy_cache.c
Date Sat, 06 Sep 1997 11:37:17 GMT
Marc Slemko wrote:
> The below (at the end of this message) patch that Ben applied is bogus.
> curbytes needs to be signed:
>             if (curbytes < 0)
>             {
>                 curbytes += 1024;
>                 curblocks--;
>             }
> This probably breaks things in reality.  You can't just make things
> unsigned.

I am aware of that. I missed this bit, though.

> Not sure about the other changes.

I did try to check them. Clearly, I didn't quite get it right.

> I'm not sure what to think about a compiler that gives such verbose
> warnings that having them signed causes it to whine (I'm assuming it is
> because the code does something like assign an unsigned value to the
> signed value)

It's mostly because of comparing signed to unsigned.

> yet testing to see if an unsigned value is <0 doesn't set
> off alarms.

Yeah, I was expecting it to, which is partly why I didn't check as
carefully as I might've done. I'm sure older versions did. I'll



Ben Laurie            |Phone: +44 (181) 994 6435|Apache Group member
Freelance Consultant  |Fax:   +44 (181) 994 6472|
and Technical Director|Email: |Apache-SSL author
A.L. Digital Ltd,     |
London, England.      |"Apache: TDG"

View raw message