Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 lines
430 B

  1. // PRECOMP
  2. #include "precomp.h"
  3. POSITION CWBOBLIST::AddHead(VOID* pItem)
  4. {
  5. POSITION posRet = NULL;
  6. if (m_pHead)
  7. {
  8. if (posRet = new COBNODE)
  9. {
  10. posRet->pNext = m_pHead;
  11. posRet->pItem = pItem;
  12. m_pHead = posRet;
  13. }
  14. }
  15. else
  16. {
  17. ASSERT(!m_pTail);
  18. if (m_pHead = new COBNODE)
  19. {
  20. m_pTail = m_pHead;
  21. m_pHead->pItem = pItem;
  22. m_pHead->pNext = NULL;
  23. }
  24. }
  25. return m_pHead;
  26. }