https://git.reactos.org/?p=reactos.git;a=commitdiff;h=d3a97e222875ffedec021828dd1454cfadbeb653

commit d3a97e222875ffedec021828dd1454cfadbeb653
Author:     Hermès Bélusca-Maïto <[email protected]>
AuthorDate: Sun Dec 30 13:40:09 2018 +0100
Commit:     Hermès Bélusca-Maïto <[email protected]>
CommitDate: Sun Dec 30 15:26:35 2018 +0100

    [NTOS] Code formatting only.
---
 ntoskrnl/fstub/disksup.c | 11 ++++-------
 ntoskrnl/io/iomgr/file.c | 15 ++++++---------
 2 files changed, 10 insertions(+), 16 deletions(-)

diff --git a/ntoskrnl/fstub/disksup.c b/ntoskrnl/fstub/disksup.c
index ef5630d0ee..e7ab0a7990 100644
--- a/ntoskrnl/fstub/disksup.c
+++ b/ntoskrnl/fstub/disksup.c
@@ -1503,8 +1503,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
         if (!Offset.QuadPart)
         {
             /* Then read the signature off the disk */
-            (*PartitionBuffer)->Signature =  ((PULONG)Buffer)
-                                             [PARTITION_TABLE_OFFSET / 2 - 1];
+            (*PartitionBuffer)->Signature = 
((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1];
         }
 
         /* Get the partition descriptor array */
@@ -1540,7 +1539,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
             /* Make sure that the partition is valid, unless it's the first */
             if (!(HalpIsValidPartitionEntry(PartitionDescriptor,
                                             MaxOffset,
-                                            MaxSector)) && !(j))
+                                            MaxSector)) && (j == 0))
             {
                 /* It's invalid, so fail */
                 IsValid = FALSE;
@@ -1722,9 +1721,7 @@ xHalIoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject,
 
     /* Check if this is a removable device that's probably a super-floppy */
     if ((DiskGeometry.MediaType == RemovableMedia) &&
-        !(j) &&
-        (MbrFound) &&
-        (IsEmpty))
+        (j == 0) && (MbrFound) && (IsEmpty))
     {
         /* Read the jump bytes to detect super-floppy */
         if ((BootSectorInfo->JumpByte[0] == 0xeb) ||
@@ -2133,7 +2130,7 @@ xHalIoWritePartitionTable(IN PDEVICE_OBJECT DeviceObject,
                 if (((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1] !=
                     PartitionBuffer->Signature)
                 {
-                    /* Then write the signature and now w need a rewrite */
+                    /* Then write the signature and now we need a rewrite */
                     ((PULONG)Buffer)[PARTITION_TABLE_OFFSET / 2 - 1] =
                         PartitionBuffer->Signature;
                     DoRewrite = TRUE;
diff --git a/ntoskrnl/io/iomgr/file.c b/ntoskrnl/io/iomgr/file.c
index 6b6b2e4abe..a6132692ae 100644
--- a/ntoskrnl/io/iomgr/file.c
+++ b/ntoskrnl/io/iomgr/file.c
@@ -210,7 +210,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
         }
         else
         {
-            /* Compute how much mem we'll need */
+            /* Compute how much memory we'll need */
             RequiredLength = DataBuffer->Reserved + Length + 
sizeof(UNICODE_NULL);
 
             /* Check if FileObject can already hold what we need */
@@ -224,7 +224,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
                 NewBuffer = ExAllocatePoolWithTag(PagedPool, RequiredLength, 
TAG_IO_NAME);
                 if (NewBuffer == NULL)
                 {
-                     Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
+                    Irp->IoStatus.Status = STATUS_INSUFFICIENT_RESOURCES;
                 }
             }
         }
@@ -233,7 +233,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
     /* Everything went right */
     if (NT_SUCCESS(Irp->IoStatus.Status))
     {
-        /* Copy reserved */
+        /* Copy the reserved data */
         if (DataBuffer->Reserved)
         {
             RtlMoveMemory((PWSTR)((ULONG_PTR)NewBuffer + Length),
@@ -241,7 +241,7 @@ IopDoNameTransmogrify(IN PIRP Irp,
                           DataBuffer->Reserved);
         }
 
-        /* Then, buffer */
+        /* Then the buffer */
         if (Length)
         {
             RtlCopyMemory(NewBuffer, Buffer, Length);
@@ -958,12 +958,9 @@ IopParseDevice(IN PVOID ParseObject,
         if (RemainingName->Length)
         {
             /* Setup the unicode string */
-            FileObject->FileName.MaximumLength = RemainingName->Length +
-                                                 sizeof(WCHAR);
+            FileObject->FileName.MaximumLength = RemainingName->Length + 
sizeof(WCHAR);
             FileObject->FileName.Buffer = ExAllocatePoolWithTag(PagedPool,
-                                                                FileObject->
-                                                                FileName.
-                                                                MaximumLength,
+                                                                
FileObject->FileName.MaximumLength,
                                                                 TAG_IO_NAME);
             if (!FileObject->FileName.Buffer)
             {

Reply via email to