Revert "Share the message buffer if we have room"

This reverts commit 17ce0cd52f.
This commit is contained in:
Miek Gieben 2014-01-28 22:43:48 +00:00
parent ca87093b6d
commit 9ba617e870
1 changed files with 1 additions and 9 deletions

10
msg.go
View File

@ -254,15 +254,7 @@ func packDomainName(s string, msg []byte, off int, compression map[string]int, c
pointer := -1
// Emit sequence of counted strings, chopping at dots.
begin := 0
// We can share the message buffer because we don't need to look back.
// Keeping close makes tests more sensitive to failure (only 1 byte of room).
var bs []byte
if len(s) < len(msg) {
bs = msg[off+1:]
copy(bs, s)
} else {
bs = []byte(s)
}
bs := []byte(s)
ro_bs, bs_fresh := s, true
for i := 0; i < ls; i++ {
if bs[i] == '\\' {