From: Pierre Schweitzer Date: Sat, 3 Jun 2017 19:56:50 +0000 (+0000) Subject: [UDFS] X-Git-Tag: ReactOS-0.4.6~526 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=9b036de80bc06cf9476b9913d03f2bdf48e6fbbb;ds=sidebyside [UDFS] Fix broken code when UDF_DBG isn't set CORE-4375 svn path=/trunk/; revision=74801 --- diff --git a/reactos/drivers/filesystems/udfs/udf_info/extent.cpp b/reactos/drivers/filesystems/udfs/udf_info/extent.cpp index ec7fed2b4c6..2ffa31df594 100644 --- a/reactos/drivers/filesystems/udfs/udf_info/extent.cpp +++ b/reactos/drivers/filesystems/udfs/udf_info/extent.cpp @@ -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)); diff --git a/reactos/drivers/filesystems/udfs/udf_info/udf_info.cpp b/reactos/drivers/filesystems/udfs/udf_info/udf_info.cpp index 452faa78375..d7f9771fde5 100644 --- a/reactos/drivers/filesystems/udfs/udf_info/udf_info.cpp +++ b/reactos/drivers/filesystems/udfs/udf_info/udf_info.cpp @@ -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);