Subversion Repositories HelenOS

Compare Revisions

Regard whitespace Rev 4414 → Rev 4415

/trunk/uspace/lib/libc/generic/libadt/list.c
48,12 → 48,12
*/
int list_member(const link_t *link, const link_t *head)
{
int found = false;
int found = 0;
link_t *hlp = head->next;
while (hlp != head) {
if (hlp == link) {
found = true;
found = 1;
break;
}
hlp = hlp->next;
85,5 → 85,28
list_initialize(head2);
}
 
 
/** Count list items
*
* Return the number of items in the list.
*
* @param link List to count.
*
* @return Number of items in the list.
*
*/
unsigned int list_count(const link_t *link)
{
unsigned int count = 0;
link_t *hlp = link->next;
while (hlp != link) {
count++;
hlp = hlp->next;
}
return count;
}
 
/** @}
*/