diff options
author | Tom Gundersen <teg@jklm.no> | 2015-08-25 14:33:41 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-08-25 14:33:41 +0200 |
commit | 1c76020aa5eaf2d4bd6e5ba92c1f358279b52592 (patch) | |
tree | fcb3a26d88e26f93c640b5a76abb7904b42ef430 /src/resolve/resolved-dns-packet.h | |
parent | dd42560795996c723d4631570b74ac644934ebd3 (diff) | |
parent | eff91ee0070f85432e4926403b58ed10cbea1af5 (diff) |
Merge pull request #1030 from zonque/resolve
resolve: minor cleanups
Diffstat (limited to 'src/resolve/resolved-dns-packet.h')
-rw-r--r-- | src/resolve/resolved-dns-packet.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-packet.h b/src/resolve/resolved-dns-packet.h index e81f8a8202..8a72b898da 100644 --- a/src/resolve/resolved-dns-packet.h +++ b/src/resolve/resolved-dns-packet.h @@ -239,11 +239,16 @@ static inline uint64_t SD_RESOLVED_FLAGS_MAKE(DnsProtocol protocol, int family) /* Converts a protocol + family into a flags field as used in queries */ - if (protocol == DNS_PROTOCOL_DNS) + switch (protocol) { + case DNS_PROTOCOL_DNS: return SD_RESOLVED_DNS; - if (protocol == DNS_PROTOCOL_LLMNR) + case DNS_PROTOCOL_LLMNR: return family == AF_INET6 ? SD_RESOLVED_LLMNR_IPV6 : SD_RESOLVED_LLMNR_IPV4; + default: + break; + } + return 0; } |