librnr/dlistvoid.c
void DListVoidDeleteNode(DListVoid_T *pHead, DListVoidNode_T *pNode)
{
  LOGDIAG4CALL(_TPTR(pHead), _TPTR(pNode));

  CHKPTR(pHead);
  CHKPTR(pNode);

  if( DLISTVOID_IS_EMPTY(pHead) )
  {
    LOGERROR("dlist is empty");
    return;
  }

  // remove from list
  dlist_delete(&pNode->m_dnode);

  // free any data by value
  if( pHead->m_fnDataDelete != NULL )
  {
    pHead->m_fnDataDelete(pNode->m_pData);
  }

  // free up node
  delete(pNode);

  pHead->m_nNumNodes--;
}
/*!
 * \brief Unlink node from the dlist and delete the node and it's attached
 * user data.
 *
 * User data are deleted with a callback to the user-supplied data delete
 * function, if any.
 *
 * \param pHead  Pointer to dlist (head).
 * \param pNode  Pointer to node to be deleted.
 */
\brief Unlink node from the dlist and delete the node and it's attached
user data.

User data are deleted with a callback to the user-supplied data delete
function, if any.

\param pHead  Pointer to dlist (head).
\param pNode  Pointer to node to be deleted.
\ brief Unlink node from the dlist and delete the node and it ' s attached user data . User data are deleted with a callback to the user - supplied data delete function if any . \ param pHead Pointer to dlist ( head ) . \ param pNode Pointer to node to be deleted .
void DListVoidDeleteNode(DListVoid_T *pHead, DListVoidNode_T *pNode)
{
  LOGDIAG4CALL(_TPTR(pHead), _TPTR(pNode));
  CHKPTR(pHead);
  CHKPTR(pNode);
  if( DLISTVOID_IS_EMPTY(pHead) )
  {
    LOGERROR("dlist is empty");
    return;
  }
  dlist_delete(&pNode->m_dnode);
  if( pHead->m_fnDataDelete != NULL )
  {
    pHead->m_fnDataDelete(pNode->m_pData);
  }
  delete(pNode);
  pHead->m_nNumNodes--;
}
void DListVoidDeleteNode ( DListVoid_T * pHead , DListVoidNode_T * pNode ) { LOGDIAG4CALL ( _TPTR ( pHead ) , _TPTR ( pNode ) ) ; CHKPTR ( pHead ) ; CHKPTR ( pNode ) ; if ( DLISTVOID_IS_EMPTY ( pHead ) ) { LOGERROR ( " " ) ; return ; } dlist_delete ( & pNode -> m_dnode ) ; if ( pHead -> m_fnDataDelete != NULL ) { pHead -> m_fnDataDelete ( pNode -> m_pData ) ; } delete ( pNode ) ; pHead -> m_nNumNodes -- ; }
\brief Unlink node from the dlist and delete the node and it's attached
 user data.
\ brief Unlink node from the dlist and delete the node and it ' s attached user data .
// remove from list // free any data by value // free up node