BRIGADE_NORMALIZE is bad coding example

2004-08-12 Thread Glenn Strauss
The BRIGADE_NORMALIZE macro in server/core.c is a terrible coding example of brigade use. It took me a little while to wrap my head around brigades because I had assumed this code to be correct. It is not.

Re: BRIGADE_NORMALIZE is bad coding example

2004-08-12 Thread Justin Erenkrantz
--On Thursday, August 12, 2004 5:03 PM -0400 Glenn Strauss [EMAIL PROTECTED] wrote: BRIGADE_NORMALIZE skips the bucket after a 0-length bucket. In doing so, it might skip a 0-length bucket following it. If the last IMHO, the cleanest correct fix is to just add an else clause. At the cost of

Re: BRIGADE_NORMALIZE is bad coding example

2004-08-12 Thread Glenn Strauss
On Thu, Aug 12, 2004 at 02:27:03PM -0700, Justin Erenkrantz wrote: --On Thursday, August 12, 2004 5:03 PM -0400 Glenn Strauss [EMAIL PROTECTED] wrote: BRIGADE_NORMALIZE skips the bucket after a 0-length bucket. In doing so, it might skip a 0-length bucket following it. If the last

Re: BRIGADE_NORMALIZE is bad coding example

2004-08-12 Thread Justin Erenkrantz
--On Thursday, August 12, 2004 6:24 PM -0400 Glenn Strauss [EMAIL PROTECTED] wrote: Right. I didn't say it was a problem in practice. I did say that it was a terrible piece of code, and since this list often refers people to look at the code, it should be fixed, IMHO. It is a _bad_ and _broken_