cosmetic: more linting

This commit is contained in:
Matthias Radestock committed 2015-03-27 01:12:16 +00:00
1 parent e3ef5433cf
commit 1ad950f177
11 files changed
+76 -85

No files matched your search

+4 -4
View File
@@ -150,14 +150,14 @@ func (e *cacheEntry) setReply(reply *dns.Msg, flags uint8, now time.Time) bool {
e.validUntil = now.Add(time.Second * time.Duration(negLocalTTL))
} else {
// calculate the validUntil from the reply TTL
var minTtl uint32 = math.MaxUint32
var minTTL uint32 = math.MaxUint32
for _, rr := range reply.Answer {
ttl := rr.Header().Ttl
if ttl < minTtl {
minTtl = ttl // TODO: improve the minTTL calculation (maybe we should skip some RRs)
if ttl < minTTL {
minTTL = ttl // TODO: improve the minTTL calculation (maybe we should skip some RRs)
}
}
e.validUntil = now.Add(time.Second * time.Duration(minTtl))
e.validUntil = now.Add(time.Second * time.Duration(minTTL))
}
if reply != nil {