mirror of
https://github.com/miekg/dns.git
synced 2025-12-16 17:21:17 +01:00
Address miekg's comments
This commit is contained in:
parent
020002b9e0
commit
52647ae7a7
4
msg.go
4
msg.go
@ -921,8 +921,8 @@ func packStructValue(val reflect.Value, msg []byte, off int, compression map[str
|
|||||||
copy(msg[off:off+len(s)], s)
|
copy(msg[off:off+len(s)], s)
|
||||||
off += len(s)
|
off += len(s)
|
||||||
case `dns:"octet"`:
|
case `dns:"octet"`:
|
||||||
var varstrTmp []byte
|
bytesTmp := make([]byte, 0)
|
||||||
off, err = packOctetString(fv.String(), msg, off, varstrTmp)
|
off, err = packOctetString(fv.String(), msg, off, bytesTmp)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return lenmsg, err
|
return lenmsg, err
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2197,8 +2197,6 @@ func setCAA(h RR_Header, c chan lex, o, f string) (RR, *ParseError, string) {
|
|||||||
}
|
}
|
||||||
if len(s) > 1 {
|
if len(s) > 1 {
|
||||||
return nil, &ParseError{f, "bad CAA Value", l}, ""
|
return nil, &ParseError{f, "bad CAA Value", l}, ""
|
||||||
} else if len(s) == 0 {
|
|
||||||
rr.Value = ""
|
|
||||||
} else {
|
} else {
|
||||||
rr.Value = s[0]
|
rr.Value = s[0]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user