l is never used (#1071)

Signed-off-by: Lehner Florian <dev@der-flo.net>
This commit is contained in:
Florian Lehner 2020-02-03 21:10:40 +01:00 committed by GitHub
parent 6c0c4e6581
commit 7963800469
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

1
msg.go
View File

@ -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)

View File

@ -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.