On Wed, Aug 13, 2003 at 02:08:57AM -0400, Cliff Woolley wrote:
> On Tue, 12 Aug 2003, Greg Stein wrote:
>
> > > + while (curr) {
> > > + if (node == curr) {
> > > + return 0;
> > > + }
> > > + curr = curr->next;
> > > + }
> > > + return 1;
> >
> > Forget the return code. Just stick an abort() in here.
>
> return 0 to pop the assert, abort, same difference. :) But sure, I'll do
> it that way, why not.
Sure, six of one, half-dozen of another. But the way I saw it was that the
return code was superfluous since the only caller was your macro. Thus, you
can just shift all the [abort] logic into the function rather than split
between the func and the macro.
But in any case, having a consistency check on those buggers is Goodness.
Cheers,
-g
--
Greg Stein, http://www.lyra.org/