Fix broken code when UDF_DBG isn't set

CORE-4375

svn path=/trunk/; revision=74801
This commit is contained in:
Pierre Schweitzer 2017-06-03 19:56:50 +00:00
parent 6e19246ef7
commit 9b036de80b
2 changed files with 8 additions and 0 deletions

View file

@ -1860,7 +1860,9 @@ UDFMarkAllocatedAsRecorded(
UDFPackMapping(Vcb, ExtInfo);
}
AdPrint(("Alloc->Rec (1) new %x\n", ExtInfo->Mapping));
#ifdef UDF_DBG
ASSERT(check_size == UDFGetExtentLength(ExtInfo->Mapping));
#endif
AdPrint(("Alloc->Rec: ExtInfo %x, Extent %x\n", ExtInfo, ExtInfo->Mapping));
return STATUS_SUCCESS;
}
@ -1928,8 +1930,10 @@ UDFMarkAllocatedAsRecorded(
ExtInfo->Mapping = NewExtent;
if(TryPack)
UDFPackMapping(Vcb, ExtInfo);
#ifdef UDF_DBG
ASSERT(check_size == UDFGetExtentLength(ExtInfo->Mapping));
ASSERT(!(check_size & (LBS-1)));
#endif
AdPrint(("Alloc->Rec: ExtInfo %x, Extent %x\n", ExtInfo, ExtInfo->Mapping));
@ -2828,8 +2832,10 @@ UDFPackMapping(
NewMap[j].extLength =
NewMap[j].extLocation = 0;
#ifdef UDF_DBG
ASSERT(check_size == UDFGetExtentLength(ExtInfo->Mapping));
ASSERT(check_size == UDFGetExtentLength(NewMap));
#endif
AdPrint(("Pack ExtInfo %x, NewMap %x, OldMap %x\n", ExtInfo, NewMap, OldMap));

View file

@ -2419,7 +2419,9 @@ UDFCleanUpFile__(
if(!KeepDloc) {
#ifdef UDF_DBG
ASSERT(!Modified);
#endif
#ifndef UDF_TRACK_ONDISK_ALLOCATION
if(Dloc->DataLoc.Mapping) MyFreePool__(Dloc->DataLoc.Mapping);