From 2011a27bde7f2363b231f607c33355a84a3e9ab2 Mon Sep 17 00:00:00 2001 From: Ben Adams Date: Sat, 19 Nov 2016 05:10:16 +0000 Subject: [PATCH] Use ternary op rather than lazy and --- .../Internal/Infrastructure/MemoryPoolIterator.cs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Infrastructure/MemoryPoolIterator.cs b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Infrastructure/MemoryPoolIterator.cs index 7c7e0865e8..97b71e3a2d 100644 --- a/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Infrastructure/MemoryPoolIterator.cs +++ b/src/Microsoft.AspNetCore.Server.Kestrel/Internal/Infrastructure/MemoryPoolIterator.cs @@ -258,8 +258,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure return true; } - // wasLastBlock ? false : TryPeekLongMultiBlock(ref longValue, blockBytes); - return !wasLastBlock && TryPeekLongMultiBlock(ref longValue, blockBytes); + return wasLastBlock ? false : TryPeekLongMultiBlock(ref longValue, blockBytes); } [MethodImpl(MethodImplOptions.NoInlining)] @@ -818,8 +817,7 @@ namespace Microsoft.AspNetCore.Server.Kestrel.Internal.Infrastructure return true; } - // wasLastBlock ? false : PutMultiBlock(data); - return !wasLastBlock && PutMultiBlock(data); + return wasLastBlock ? false : PutMultiBlock(data); } [MethodImpl(MethodImplOptions.NoInlining)]