/* Obtains the item that is located one position further down in the list, relative to the item given in the parameter. Note that the item is just read, not removed.  */
void* TbxListGetNextItem(tTbxList const *list, void const *itemRef)
/* Obtains the item that is located one position further down in the list, relative to the item given in the parameter. Note that the item is just read, not removed.  */
void* TbxListGetNextItem(tTbxList const *list, void const *itemRef)
{
  void               * result = NULL;
  tTbxListNode const * listNodePtr;
  TBX_ASSERT(list != NULL);
  TBX_ASSERT(itemRef != NULL);
  if ( (list != NULL) && (itemRef != NULL) )
  {
    TbxCriticalSectionEnter();
    listNodePtr = TbxListFindListNode(list, itemRef);
    if (listNodePtr != NULL)
    {
      listNodePtr = listNodePtr->nextNodePtr;
      if (listNodePtr != NULL)
      {
        result = listNodePtr->itemPtr;
      }
    }
    TbxCriticalSectionExit();
  }
  return result;
}