[NTFS] - Fix some formatting / style issues, per CR-123.
authorTrevor Thompson <tmt256@email.vccs.edu>
Wed, 5 Jul 2017 22:10:22 +0000 (22:10 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Sun, 10 Dec 2017 10:15:00 +0000 (11:15 +0100)
svn path=/branches/GSoC_2016/NTFS/; revision=75290

drivers/filesystems/ntfs/attrib.c
drivers/filesystems/ntfs/btree.c
drivers/filesystems/ntfs/create.c
drivers/filesystems/ntfs/fcb.c
drivers/filesystems/ntfs/mft.c

index 7dcdabb..bd070c9 100644 (file)
@@ -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;
         }
 
-        ifLargeLbn != -1)
+        if (LargeLbn != -1)
         {
             // deallocate this cluster
             RtlClearBits(&Bitmap, LargeLbn, 1);
index eff2b15..1791072 100644 (file)
@@ -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
index 8274d97..30cc921 100644 (file)
@@ -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);
index 5497b80..fe79511 100644 (file)
@@ -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");
 
index 87820e6..ed531df 100644 (file)
@@ -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;