diff --git a/Lib/html/parser.py b/Lib/html/parser.py
index 13c95c34e505c8..4a0c5297d97b88 100644
--- a/Lib/html/parser.py
+++ b/Lib/html/parser.py
@@ -226,9 +226,6 @@ def goahead(self, end):
if match:
# match.group() will contain at least 2 chars
if end and match.group() == rawdata[i:]:
- k = match.end()
- if k <= i:
- k = n
i = self.updatepos(i, i + 1)
# incomplete
break