mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 00:46:36 +03:00
fix warnings by ineffassign, with a one actual issue
In store/search.go, we would make a copy of a byte array, but then still use the original instead of the copy. Could result in search operations not finding messages that do have the content, but under very unlikely conditions only. We'll keep running ineffassign with "make check", useful enough.
This commit is contained in:
4
main.go
4
main.go
@ -1960,11 +1960,12 @@ sharing most of its code.
|
||||
|
||||
resolver := dns.StrictResolver{}
|
||||
var haveMX bool
|
||||
var origNextHopAuthentic, expandedNextHopAuthentic bool
|
||||
var expandedNextHopAuthentic bool
|
||||
var expandedNextHop dns.Domain
|
||||
var hosts []dns.IPDomain
|
||||
if len(args) == 1 {
|
||||
var permanent bool
|
||||
var origNextHopAuthentic bool
|
||||
var err error
|
||||
haveMX, origNextHopAuthentic, expandedNextHopAuthentic, expandedNextHop, hosts, permanent, err = smtpclient.GatherDestinations(ctxbg, c.log.Logger, resolver, dns.IPDomain{Domain: origNextHop})
|
||||
status := "temporary"
|
||||
@ -1998,7 +1999,6 @@ sharing most of its code.
|
||||
d := xparseDomain(args[1], "destination host")
|
||||
log.Printf("skipping domain mx/cname lookups, assuming domain is dnssec-protected")
|
||||
|
||||
origNextHopAuthentic = true
|
||||
expandedNextHopAuthentic = true
|
||||
expandedNextHop = d
|
||||
hosts = []dns.IPDomain{{Domain: d}}
|
||||
|
Reference in New Issue
Block a user