From c694dc70d72caa86a084c1cf51a6830264eaef84 Mon Sep 17 00:00:00 2001
From: "github-actions[bot]"
 <41898282+github-actions[bot]@users.noreply.github.com>
Date: Sat, 18 Jun 2022 09:57:51 +0000
Subject: [PATCH] Sync shared code from runtime (#42276)

Co-authored-by: Tratcher <Tratcher@users.noreply.github.com>
---
 src/Shared/runtime/Http2/Hpack/IntegerDecoder.cs | 4 ++--
 src/Shared/runtime/Http2/Hpack/IntegerEncoder.cs | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/Shared/runtime/Http2/Hpack/IntegerDecoder.cs b/src/Shared/runtime/Http2/Hpack/IntegerDecoder.cs
index 34ab1d294ec..b717b3d4d83 100644
--- a/src/Shared/runtime/Http2/Hpack/IntegerDecoder.cs
+++ b/src/Shared/runtime/Http2/Hpack/IntegerDecoder.cs
@@ -73,7 +73,7 @@ namespace System.Net.Http.HPack
                 throw new HPackDecodingException(SR.net_http_hpack_bad_integer);
             }
 
-            _i = _i + ((b & 0x7f) << _m);
+            _i += ((b & 0x7f) << _m);
 
             // If the addition overflowed, the result will be negative.
             if (_i < 0)
@@ -81,7 +81,7 @@ namespace System.Net.Http.HPack
                 throw new HPackDecodingException(SR.net_http_hpack_bad_integer);
             }
 
-            _m = _m + 7;
+            _m += 7;
 
             if ((b & 128) == 0)
             {
diff --git a/src/Shared/runtime/Http2/Hpack/IntegerEncoder.cs b/src/Shared/runtime/Http2/Hpack/IntegerEncoder.cs
index b25b218522b..22719673ffc 100644
--- a/src/Shared/runtime/Http2/Hpack/IntegerEncoder.cs
+++ b/src/Shared/runtime/Http2/Hpack/IntegerEncoder.cs
@@ -50,7 +50,7 @@ namespace System.Net.Http.HPack
                     return false;
                 }
 
-                value = value - ((1 << numBits) - 1);
+                value -= ((1 << numBits) - 1);
                 int i = 1;
 
                 while (value >= 128)
@@ -63,7 +63,7 @@ namespace System.Net.Http.HPack
                         return false;
                     }
 
-                    value = value / 128;
+                    value /= 128;
                 }
                 destination[i++] = (byte)value;
 
-- 
GitLab