Switch replaced by if cause only one case

This commit is contained in:
Mael G. 2020-12-13 14:38:24 -04:00
parent e28b61e2f0
commit 2e187300c6

View file

@ -11,8 +11,7 @@ func HandleDnsRequest(w dns.ResponseWriter, r *dns.Msg) {
m.SetReply(r)
m.Compress = true //Less CPU usage (?)
switch r.Opcode { //Only respond to dns queries
case dns.OpcodeQuery:
if r.Opcode == dns.OpcodeQuery { //Only respond to dns queries
parseQuery(m)
}