openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/sysfsutils/2.1.0-r5/sysfsutils-2.1.0/lib/dlist.c
inline void* _dlist_mark_move(Dlist* list, int direction)
{
    if (direction)
    {
        if (list->marker && list->marker->next != NULL)
            list->marker = list->marker->next;
        else
            return (NULL);
    }
    else
    {
        if (list->marker && list->marker->prev != NULL)
            list->marker = list->marker->prev;
        else
            return (NULL);
    }
    if (list->marker != list->head)
        return (list->marker->data);
    else
        return (NULL);
}
/* internal use function
 * quickie inline to consolidate the marker movement logic
 * in one place
 *
 * when direction true it moves marker after
 * when direction false it moves marker before.
 * return pointer to data at new marker
 * if nowhere to move the marker in desired direction return null
 */
internal use function
quickie inline to consolidate the marker movement logic
in one place

when direction true it moves marker after
when direction false it moves marker before.
return pointer to data at new marker
if nowhere to move the marker in desired direction return null
internal use function quickie inline to consolidate the marker movement logic in one place when direction true it moves marker after when direction false it moves marker before . return pointer to data at new marker if nowhere to move the marker in desired direction return null
inline void* _dlist_mark_move(Dlist* list, int direction)
{
    if (direction)
    {
        if (list->marker && list->marker->next != NULL)
            list->marker = list->marker->next;
        else
            return (NULL);
    }
    else
    {
        if (list->marker && list->marker->prev != NULL)
            list->marker = list->marker->prev;
        else
            return (NULL);
    }
    if (list->marker != list->head)
        return (list->marker->data);
    else
        return (NULL);
}
inline void * _dlist_mark_move ( Dlist * list , int direction ) { if ( direction ) { if ( list -> marker && list -> marker -> next != NULL ) list -> marker = list -> marker -> next ; else return ( NULL ) ; } else { if ( list -> marker && list -> marker -> prev != NULL ) list -> marker = list -> marker -> prev ; else return ( NULL ) ; } if ( list -> marker != list -> head ) return ( list -> marker -> data ) ; else return ( NULL ) ; }
internal use function
 quickie inline to consolidate the marker movement logic
 in one place
internal use function quickie inline to consolidate the marker movement logic in one place