FreeBSD/sys/dev/isci/scil/sci_abstract_list.c
/**
 * This method simply performs the common portion of popping a list element
 * from a list.
 *
 * WARNING: This is a private helper method that should not be called directly
 *          by any users.
 */
This method simply performs the common portion of popping a list element
from a list.

This is a private helper method that should not be called directly
by any users.
This method simply performs the common portion of popping a list element from a list . This is a private helper method that should not be called directly by any users .
SCI_ABSTRACT_ELEMENT_T * private_pop_front(
   SCI_ABSTRACT_ELEMENT_LIST_T * privateList_p
)
{
   SCI_ABSTRACT_ELEMENT_T * alElement_p = (privateList_p)->front_p;
   if (alElement_p != NULL)
   {
      if ((privateList_p)->front_p == (privateList_p)->back_p)
      {
         (privateList_p)->front_p = (privateList_p)->back_p = NULL;
      }
      else
      {
         (privateList_p)->front_p = (privateList_p)->front_p->next_p;
         (privateList_p)->front_p->previous_p = NULL;
      }
      (privateList_p)->size--;
   }
   return alElement_p;
}
SCI_ABSTRACT_ELEMENT_T * private_pop_front ( SCI_ABSTRACT_ELEMENT_LIST_T * privateList_p ) { SCI_ABSTRACT_ELEMENT_T * alElement_p = ( privateList_p ) -> front_p ; if ( alElement_p != NULL ) { if ( ( privateList_p ) -> front_p == ( privateList_p ) -> back_p ) { ( privateList_p ) -> front_p = ( privateList_p ) -> back_p = NULL ; } else { ( privateList_p ) -> front_p = ( privateList_p ) -> front_p -> next_p ; ( privateList_p ) -> front_p -> previous_p = NULL ; } ( privateList_p ) -> size -- ; } return alElement_p ; }
This method simply performs the common portion of popping a list element
 from a list.
This method simply performs the common portion of popping a list element from a list .