Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
madmir committed Sep 4, 2019
1 parent 2857de1 commit c16900c
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 25 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
<Compile Include="$(CommonPath)\Interop\Windows\Interop.Libraries.cs">
<Link>Common\Interop\Windows\Interop.Libraries.cs</Link>
</Compile>
<Compile Include="$(CommonPath)\Interop\Windows\Kernel32\Interop.ReadFile_Bool_SafeHandle_IntPtr.cs">
<Link>Common\Interop\Windows\kernel32\Interop.ReadFile_Bool_SafeHandle_IntPtr.cs</Link>
<Compile Include="$(CommonPath)\CoreLib\Interop\Windows\Kernel32\Interop.ReadFile_SafeHandle_IntPtr.cs">
<Link>Common\CoreLib\Interop\Windows\kernel32\Interop.ReadFile_SafeHandle_IntPtr.cs</Link>
</Compile>
<Compile Include="System\Reflection\Internal\Utilities\PinnedObject.cs" />
<Compile Include="System\Reflection\Internal\Utilities\CriticalDisposableObject.cs" Condition="'$(TargetGroup)' != 'netstandard1.1'" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ internal static unsafe bool TryReadFile(Stream stream, byte* buffer, long start,
return false;
}

bool result = false;
int result = 0;
int bytesRead = 0;

try
Expand All @@ -66,7 +66,7 @@ internal static unsafe bool TryReadFile(Stream stream, byte* buffer, long start,
return false;
}

if (!result || bytesRead != size)
if (result == 0 || bytesRead != size)
{
// We used to throw here, but this is where we land if the FileStream was
// opened with useAsync: true, which is currently the default on .NET Core.
Expand Down

0 comments on commit c16900c

Please sign in to comment.