[USETUP][ROSAPPS][EXT2LIB] NtReadFile() calls: Remove unused 'ByteOffset = 0', Use... 100/head
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Wed, 1 Nov 2017 12:20:14 +0000 (13:20 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Fri, 3 Nov 2017 14:02:16 +0000 (15:02 +0100)
base/setup/usetup/bootsup.c
base/setup/usetup/native/utils/console.c
modules/rosapps/applications/sysutils/utils/pice/module/utils.c
sdk/lib/fslib/ext2lib/Disk.c

index 7b4629b..9c05e3e 100644 (file)
@@ -1001,7 +1001,6 @@ InstallFat32BootCodeToFile(
         return Status;
     }
 
         return Status;
     }
 
-    FileOffset.QuadPart = 0ULL;
     Status = NtReadFile(FileHandle,
                         NULL,
                         NULL,
     Status = NtReadFile(FileHandle,
                         NULL,
                         NULL,
index aa2a566..2ab380a 100644 (file)
@@ -170,7 +170,7 @@ FlushConsoleInputBuffer(
                             &InputData,
                             sizeof(KEYBOARD_INPUT_DATA),
                             &Offset,
                             &InputData,
                             sizeof(KEYBOARD_INPUT_DATA),
                             &Offset,
-                            0);
+                            NULL);
         if (Status == STATUS_PENDING)
         {
             Timeout.QuadPart = -100;
         if (Status == STATUS_PENDING)
         {
             Timeout.QuadPart = -100;
@@ -208,7 +208,7 @@ ReadConsoleInput(
                         &InputData,
                         sizeof(KEYBOARD_INPUT_DATA),
                         &Offset,
                         &InputData,
                         sizeof(KEYBOARD_INPUT_DATA),
                         &Offset,
-                        0);
+                        NULL);
     if (Status == STATUS_PENDING)
     {
         Status = NtWaitForSingleObject(hConsoleInput, FALSE, NULL);
     if (Status == STATUS_PENDING)
     {
         Status = NtWaitForSingleObject(hConsoleInput, FALSE, NULL);
index 64977a0..c87e312 100644 (file)
@@ -2233,9 +2233,9 @@ long PICE_read(HANDLE hFile, LPVOID lpBuffer, long lBytes)
        ASSERT( lpBuffer );
 
        if (!NT_SUCCESS(NtReadFile(
        ASSERT( lpBuffer );
 
        if (!NT_SUCCESS(NtReadFile(
-               (HANDLE) hFile,
+               hFile,
                NULL, NULL, NULL, &iosb,
                NULL, NULL, NULL, &iosb,
-               (LPVOID) lpBuffer,
+               lpBuffer,
                (DWORD) lBytes,
                NULL,
                NULL
                (DWORD) lBytes,
                NULL,
                NULL
index 0180304..8429321 100644 (file)
@@ -982,7 +982,7 @@ Ext2ReadDisk( PEXT2_FILESYS  Ext2Sys,
         Address.QuadPart = Offset;
 
         Status = NtReadFile(  Ext2Sys->MediaHandle,
         Address.QuadPart = Offset;
 
         Status = NtReadFile(  Ext2Sys->MediaHandle,
-                              0,
+                              NULL,
                               NULL,
                               NULL,
                               &IoStatus,
                               NULL,
                               NULL,
                               &IoStatus,
@@ -1009,7 +1009,7 @@ Ext2ReadDisk( PEXT2_FILESYS  Ext2Sys,
         }
 
         Status = NtReadFile( Ext2Sys->MediaHandle,
         }
 
         Status = NtReadFile( Ext2Sys->MediaHandle,
-                             0,
+                             NULL,
                              NULL,
                              NULL,
                              &IoStatus,
                              NULL,
                              NULL,
                              &IoStatus,
@@ -1106,7 +1106,7 @@ Ext2WriteDisk( PEXT2_FILESYS  Ext2Sys,
         if ((AlignedLength != Length) || (Address.QuadPart != (LONGLONG)Offset))
         {
             Status = NtReadFile( Ext2Sys->MediaHandle,
         if ((AlignedLength != Length) || (Address.QuadPart != (LONGLONG)Offset))
         {
             Status = NtReadFile( Ext2Sys->MediaHandle,
-                                 0,
+                                 NULL,
                                  NULL,
                                  NULL,
                                  &IoStatus,
                                  NULL,
                                  NULL,
                                  &IoStatus,