On Tue, Sep 18, 2001 at 06:33:14PM -0700, Aaron Bannert wrote:
> On Tue, Sep 18, 2001 at 06:01:35PM -0700, Greg Stein wrote:
>...
> > >...
> > > --- fdqueue.c 2001/09/18 21:14:18 1.6
> > > +++ fdqueue.c 2001/09/18 23:09:12 1.7
> > > @@ -73,7 +73,6 @@
> > > */
> > > static int ap_queue_empty(fd_queue_t *queue)
> > > {
> > > - /*return (queue->head == queue->tail);*/
> > > return (queue->blanks >= queue->bounds - 1);
> >
> > What are ->blanks and ->bounds for? The test is easier done as:
>
> remnants of when fdqueue was more complicated and offered more functions.
Understood. I meant "there is more cleanup that can be done."
> > return queue->tail == 0;
> >
> > Toss ->blanks and rename ->bounds as size or capacity or something. It is
> > only an upper-bound, so "bounds" isn't quite right semantically.
>
> I've been had for name changes in the past, so I opted for the least changes
> to reach correctness. As soon as these other major worker changes start
> settling down, I'll definately go through and do names changes and minor
> format fixes where appropriate for posterity.
Name changes are no big deal if you're improving clarity. Gratuitous changes
are usually bad :-)
In this case, name changes are going to be very localized, so it's easy. And
tossing ->blanks also simplifies things. ->tail and ->blanks are redundant.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/