From 430ce0a9e395ba1f98e4417bd14286dd9eeac552 Mon Sep 17 00:00:00 2001 From: Trevor Thompson Date: Wed, 5 Jul 2017 22:10:22 +0000 Subject: [PATCH] [NTFS] - Fix some formatting / style issues, per CR-123. svn path=/branches/GSoC_2016/NTFS/; revision=75290 --- drivers/filesystems/ntfs/attrib.c | 5 +++-- drivers/filesystems/ntfs/btree.c | 4 +++- drivers/filesystems/ntfs/create.c | 4 ++-- drivers/filesystems/ntfs/fcb.c | 2 +- drivers/filesystems/ntfs/mft.c | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/filesystems/ntfs/attrib.c b/drivers/filesystems/ntfs/attrib.c index 7dcdabbea58..bd070c97ad9 100644 --- a/drivers/filesystems/ntfs/attrib.c +++ b/drivers/filesystems/ntfs/attrib.c @@ -316,7 +316,8 @@ AddRun(PNTFS_VCB Vcb, NextVBN = AttrContext->Record.NonResident.HighestVCN + 1; // Add newly-assigned clusters to mcb - _SEH2_TRY{ + _SEH2_TRY + { if (!FsRtlAddLargeMcbEntry(&AttrContext->DataRunsMCB, NextVBN, NextAssignedCluster, @@ -796,7 +797,7 @@ FreeClusters(PNTFS_VCB Vcb, break; } - if( LargeLbn != -1) + if (LargeLbn != -1) { // deallocate this cluster RtlClearBits(&Bitmap, LargeLbn, 1); diff --git a/drivers/filesystems/ntfs/btree.c b/drivers/filesystems/ntfs/btree.c index eff2b157ade..179107272bc 100644 --- a/drivers/filesystems/ntfs/btree.c +++ b/drivers/filesystems/ntfs/btree.c @@ -77,7 +77,7 @@ CompareTreeKeys(PB_TREE_KEY Key1, PB_TREE_KEY Key2, BOOLEAN CaseSensitive) = Key2->IndexEntry->FileName.NameLength * sizeof(WCHAR); // Are the two keys the same length? - if(Key1Name.Length == Key2Name.Length) + if (Key1Name.Length == Key2Name.Length) return RtlCompareUnicodeString(&Key1Name, &Key2Name, !CaseSensitive); // Is Key1 shorter? @@ -416,7 +416,9 @@ DumpBTreeKey(PB_TREE_KEY Key, ULONG Number, ULONG Depth) DbgPrint(" '%wZ'\n", &FileName); } else + { DbgPrint(" (Dummy Key)\n"); + } } VOID diff --git a/drivers/filesystems/ntfs/create.c b/drivers/filesystems/ntfs/create.c index 8274d979922..30cc9210959 100644 --- a/drivers/filesystems/ntfs/create.c +++ b/drivers/filesystems/ntfs/create.c @@ -299,7 +299,7 @@ NtfsOpenFile(PDEVICE_EXTENSION DeviceExt, ParentFcb); } - if (!NT_SUCCESS (Status)) + if (!NT_SUCCESS(Status)) { DPRINT("Could not make a new FCB, status: %x\n", Status); @@ -347,7 +347,7 @@ NtfsCreateFile(PDEVICE_OBJECT DeviceObject, DeviceExt = DeviceObject->DeviceExtension; ASSERT(DeviceExt); - Stack = IoGetCurrentIrpStackLocation (Irp); + Stack = IoGetCurrentIrpStackLocation(Irp); ASSERT(Stack); RequestedDisposition = ((Stack->Parameters.Create.Options >> 24) & 0xff); diff --git a/drivers/filesystems/ntfs/fcb.c b/drivers/filesystems/ntfs/fcb.c index 5497b8001de..fe79511bb32 100644 --- a/drivers/filesystems/ntfs/fcb.c +++ b/drivers/filesystems/ntfs/fcb.c @@ -617,7 +617,7 @@ NtfsGetFCBForFile(PNTFS_VCB Vcb, #if 1 /* Trivial case, open of the root directory on volume */ - if (pFileName [0] == L'\0' || wcscmp(pFileName, L"\\") == 0) + if (pFileName[0] == L'\0' || wcscmp(pFileName, L"\\") == 0) { DPRINT("returning root FCB\n"); diff --git a/drivers/filesystems/ntfs/mft.c b/drivers/filesystems/ntfs/mft.c index 87820e64578..ed531df173e 100644 --- a/drivers/filesystems/ntfs/mft.c +++ b/drivers/filesystems/ntfs/mft.c @@ -448,7 +448,7 @@ SetAttributeDataLength(PFILE_OBJECT FileObject, if (NT_SUCCESS(Status)) { - if(AttrContext->Record.IsNonResident) + if (AttrContext->Record.IsNonResident) Fcb->RFCB.AllocationSize.QuadPart = AttrContext->Record.NonResident.AllocatedSize; else Fcb->RFCB.AllocationSize = *DataSize; @@ -1319,7 +1319,7 @@ WriteAttribute(PDEVICE_EXTENSION Vcb, } // end while (Length > 0) [more data to write] // TEMPTEMP - if(Context->Record.IsNonResident) + if (Context->Record.IsNonResident) ExFreePoolWithTag(TempBuffer, TAG_NTFS); Context->CacheRun = DataRun; -- 2.17.1