DLIST_CONTAINS
Tom Jansen
tom at ninja.nl
Wed Jun 19 16:58:02 GMT 2002
ARGL !! Logic error !!! (found out the hard way .... tracing pointers in gdb
sucks :-)
The function should ofcourse look like this:
/* check if an element is part of the list. */
int DLIST_CONTAINS(list, p) {
if (!p || !list) return False;
do {
if (p == list) return True;
list = list->next;
} while(list);
return False;
}
> Thank you in advance,
Tom
--
Tom Jansen -- tom at ninja.nl
Ninja ISD -- www.ninja.nl
More information about the samba-technical
mailing list