Remove End goto in packDomainName

This commit is contained in:
Tom Thorogood 2018-11-26 15:03:49 +10:30
parent 36a30d2e58
commit 4c43711692
No known key found for this signature in database
GPG Key ID: 86C63CDA416C6D2F
1 changed files with 1 additions and 4 deletions

5
msg.go
View File

@ -311,12 +311,9 @@ loop:
// if msg == nil, we will never do compression
binary.BigEndian.PutUint16(msg[nameoffset:], uint16(pointer^0xC000))
off = nameoffset + 1
goto End
}
if msg != nil && off < len(msg) {
} else if msg != nil && off < len(msg) {
msg[off] = 0
}
End:
off++
return off, labels, nil
}