Changeset 40938 in vbox for trunk/src/VBox/Runtime/common/alloc
- Timestamp:
- Apr 16, 2012 11:58:26 AM (13 years ago)
- Location:
- trunk/src/VBox/Runtime/common/alloc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/alloc/heapoffset.cpp
r40930 r40938 508 508 static PRTHEAPOFFSETBLOCK rtHeapOffsetAllocBlock(PRTHEAPOFFSETINTERNAL pHeapInt, size_t cb, size_t uAlignment) 509 509 { 510 PRTHEAPOFFSETBLOCK pRet = (PRTHEAPOFFSETBLOCK)NULL;510 PRTHEAPOFFSETBLOCK pRet = NULL; 511 511 PRTHEAPOFFSETFREE pFree; 512 512 513 AssertReturn((pHeapInt)->u32Magic == RTHEAPOFFSET_MAGIC, (PRTHEAPOFFSETBLOCK)NULL);513 AssertReturn((pHeapInt)->u32Magic == RTHEAPOFFSET_MAGIC, NULL); 514 514 #ifdef RTHEAPOFFSET_STRICT 515 515 rtHeapOffsetAssertAll(pHeapInt); … … 704 704 * of us (both lists are sorted by address). 705 705 */ 706 pLeft = (PRTHEAPOFFSETFREE)NULL;707 pRight = (PRTHEAPOFFSETFREE)NULL;706 pLeft = NULL; 707 pRight = NULL; 708 708 if (pHeapInt->offFreeTail) 709 709 { … … 814 814 static void rtHeapOffsetAssertAll(PRTHEAPOFFSETINTERNAL pHeapInt) 815 815 { 816 PRTHEAPOFFSETFREE pPrev = (PRTHEAPOFFSETFREE)NULL;817 PRTHEAPOFFSETFREE pPrevFree = (PRTHEAPOFFSETFREE)NULL;816 PRTHEAPOFFSETFREE pPrev = NULL; 817 PRTHEAPOFFSETFREE pPrevFree = NULL; 818 818 PRTHEAPOFFSETFREE pBlock; 819 819 for (pBlock = (PRTHEAPOFFSETFREE)(pHeapInt + 1); -
trunk/src/VBox/Runtime/common/alloc/heapsimple.cpp
r40932 r40938 318 318 /* Init the single free block. */ 319 319 pFree = pHeapInt->pFreeHead; 320 pFree->Core.pNext = (PRTHEAPSIMPLEBLOCK)NULL;321 pFree->Core.pPrev = (PRTHEAPSIMPLEBLOCK)NULL;320 pFree->Core.pNext = NULL; 321 pFree->Core.pPrev = NULL; 322 322 pFree->Core.pHeap = pHeapInt; 323 323 pFree->Core.fFlags = RTHEAPSIMPLEBLOCK_FLAGS_MAGIC | RTHEAPSIMPLEBLOCK_FLAGS_FREE; 324 pFree->pNext = (PRTHEAPSIMPLEFREE)NULL;325 pFree->pPrev = (PRTHEAPSIMPLEFREE)NULL;324 pFree->pNext = NULL; 325 pFree->pPrev = NULL; 326 326 pFree->cb = pHeapInt->cbFree; 327 327 … … 476 476 static PRTHEAPSIMPLEBLOCK rtHeapSimpleAllocBlock(PRTHEAPSIMPLEINTERNAL pHeapInt, size_t cb, size_t uAlignment) 477 477 { 478 PRTHEAPSIMPLEBLOCK pRet = (PRTHEAPSIMPLEBLOCK)NULL;478 PRTHEAPSIMPLEBLOCK pRet = NULL; 479 479 PRTHEAPSIMPLEFREE pFree; 480 480 … … 533 533 pPrev = (PRTHEAPSIMPLEBLOCK)(pHeapInt + 1); 534 534 Assert(pPrev == &pFree->Core); 535 pPrev->pPrev = (PRTHEAPSIMPLEBLOCK)NULL;535 pPrev->pPrev = NULL; 536 536 pPrev->pNext = &pFree->Core; 537 537 pPrev->pHeap = pHeapInt; … … 696 696 * of us (both lists are sorted by address). 697 697 */ 698 pLeft = (PRTHEAPSIMPLEFREE)NULL;699 pRight = (PRTHEAPSIMPLEFREE)NULL;698 pLeft = NULL; 699 pRight = NULL; 700 700 if (pHeapInt->pFreeTail) 701 701 { … … 728 728 Assert(pRight == pHeapInt->pFreeHead); 729 729 pFree->Core.fFlags |= RTHEAPSIMPLEBLOCK_FLAGS_FREE; 730 pFree->pPrev = (PRTHEAPSIMPLEFREE)NULL;730 pFree->pPrev = NULL; 731 731 pFree->pNext = pRight; 732 732 if (pRight) … … 806 806 static void rtHeapSimpleAssertAll(PRTHEAPSIMPLEINTERNAL pHeapInt) 807 807 { 808 PRTHEAPSIMPLEFREE pPrev = (PRTHEAPSIMPLEFREE)NULL;809 PRTHEAPSIMPLEFREE pPrevFree = (PRTHEAPSIMPLEFREE)NULL;808 PRTHEAPSIMPLEFREE pPrev = NULL; 809 PRTHEAPSIMPLEFREE pPrevFree = NULL; 810 810 PRTHEAPSIMPLEFREE pBlock; 811 811 for (pBlock = (PRTHEAPSIMPLEFREE)(pHeapInt + 1);
Note:
See TracChangeset
for help on using the changeset viewer.