On Mon, Aug 27, 2001 at 09:47:28AM -0500, William A. Rowe, Jr. wrote:
> if ((core_a->r != NULL) < (core_b->r != NULL)) {
> return -1;
> }
> else if ((core_a->r != NULL) > (core_b->r != NULL)) {
> return 1;
> }
>
> does that look better :-? I'll commit as soon as someone tells me sanity (or at
>least
> my abuse of pointers as bools) is cured :)
Ack, my C is getting too rusty. I seem to recall that (1 < 0) < (0 < 1)
not portable. Perhaps the
> if ((core_a->r == NULL) && (core_b->r != NULL)) {
style reads better, I dunno.
Is it 100% certain that the component counts are always 0 (or some known
value) for regex sections? Haven't peeked at the source to check that.
If not, an additional else {...} defending the component count comparison
when in regex sections might be safer.
Oh, well, enough C golf for today ;-).
- Barrie
- Re: cvs commit: httpd-2.0/server core.c request.c Bill Stoddard
- Re: cvs commit: httpd-2.0/server core.c request.c William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.c William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.c Barrie Slaymaker
- Re: cvs commit: httpd-2.0/server core.c request.c William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.c Bill Stoddard
- Re: cvs commit: httpd-2.0/server core.c request.c Barrie Slaymaker
- Re: cvs commit: httpd-2.0/server core.c request.c Ryan Bloom
- Re: cvs commit: httpd-2.0/server core.c request.... Bill Stoddard
- Re: cvs commit: httpd-2.0/server core.c request.c William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.... Barrie Slaymaker
- Re: cvs commit: httpd-2.0/server core.c request.c William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.c Bill Stoddard
- Re: cvs commit: httpd-2.0/server core.c request.... William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.c Roy T. Fielding
- Re: cvs commit: httpd-2.0/server core.c request.... William A. Rowe, Jr.
- Re: cvs commit: httpd-2.0/server core.c request.c William A. Rowe, Jr.
- RE: cvs commit: httpd-2.0/server core.c request.c Sander Striker
