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 2
Browse files Browse the repository at this point in the history
  • Loading branch information
madmir committed Sep 4, 2019
1 parent c16900c commit ab6778e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,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 @@ -113,7 +113,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 ab6778e

Please sign in to comment.