From 7963800469295b492f9549094e8723a39f145753 Mon Sep 17 00:00:00 2001 From: Florian Lehner Date: Mon, 3 Feb 2020 21:10:40 +0100 Subject: [PATCH] l is never used (#1071) Signed-off-by: Lehner Florian --- msg.go | 1 - msg_truncate.go | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/msg.go b/msg.go index 29381300..63656873 100644 --- a/msg.go +++ b/msg.go @@ -661,7 +661,6 @@ func unpackRRslice(l int, msg []byte, off int) (dst1 []RR, off1 int, err error) } // If offset does not increase anymore, l is a lie if off1 == off { - l = i break } dst = append(dst, r) diff --git a/msg_truncate.go b/msg_truncate.go index 89d40757..a76150a8 100644 --- a/msg_truncate.go +++ b/msg_truncate.go @@ -73,7 +73,7 @@ func (dns *Msg) Truncate(size int) { var numExtra int if l < size { - l, numExtra = truncateLoop(dns.Extra, size, l, compression) + _, numExtra = truncateLoop(dns.Extra, size, l, compression) } // See the function documentation for when we set this.