Skip to content
Snippets Groups Projects
Commit b84b1174 authored by jogarock's avatar jogarock
Browse files

removed unnecessary and potentially unclear local variable ck_p

--HG--
branch : issue_5141
parent 84e5bf6a
No related branches found
No related tags found
No related merge requests found
...@@ -303,9 +303,8 @@ class _CDPChecksum: ...@@ -303,9 +303,8 @@ class _CDPChecksum:
def post_build(self, pkt, pay): def post_build(self, pkt, pay):
p = pkt + pay p = pkt + pay
ck_p = self._check_len(p)
if self.cksum is None: if self.cksum is None:
cksum = checksum(ck_p) cksum = checksum(self._check_len(p))
p = p[:2] + struct.pack("!H", cksum) + p[4:] p = p[:2] + struct.pack("!H", cksum) + p[4:]
return p return p
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment