Address miekg's comments

This commit is contained in:
Roland Shoemaker 2015-06-18 19:17:02 -07:00
parent 020002b9e0
commit 52647ae7a7
2 changed files with 2 additions and 4 deletions

4
msg.go
View File

@ -921,8 +921,8 @@ func packStructValue(val reflect.Value, msg []byte, off int, compression map[str
copy(msg[off:off+len(s)], s)
off += len(s)
case `dns:"octet"`:
var varstrTmp []byte
off, err = packOctetString(fv.String(), msg, off, varstrTmp)
bytesTmp := make([]byte, 0)
off, err = packOctetString(fv.String(), msg, off, bytesTmp)
if err != nil {
return lenmsg, err
}

View File

@ -2197,8 +2197,6 @@ func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
}
if len(s) > 1 {
return nil, &ParseError{f, "bad CAA Value", l}, ""
} else if len(s) == 0 {
rr.Value = ""
} else {
rr.Value = s[0]
}