Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f3d2e04 authored by Christian Wailes's avatar Christian Wailes Committed by Automerger Merge Worker
Browse files

Merge "Fix enum comparison to reenable -Wenum-compare" am: 9cf99654 am: 1955d102

Original change: https://android-review.googlesource.com/c/platform/packages/modules/DnsResolver/+/1774985

Change-Id: Ia1537321743d19e16929634f32b313afc55ea3bb
parents 17a30a2a 1955d102
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -134,6 +134,7 @@ using android::net::IV_IPV6;
using android::net::IV_UNKNOWN;
using android::net::LinuxErrno;
using android::net::NetworkDnsEventReported;
using android::net::NS_T_AAAA;
using android::net::NS_T_INVALID;
using android::net::NsRcode;
using android::net::NsType;
@@ -472,7 +473,7 @@ int res_nsend(ResState* statp, const uint8_t* buf, int buflen, uint8_t* ans, int
        Stopwatch queryStopwatch;
        resplen = send_mdns(statp, buffer, ans, anssiz, &terrno, rcode);
        const IPSockAddr& receivedMdnsAddr =
                (getQueryType(buf, buflen) == T_AAAA) ? mdns_addrs[0] : mdns_addrs[1];
                (getQueryType(buf, buflen) == NS_T_AAAA) ? mdns_addrs[0] : mdns_addrs[1];
        DnsQueryEvent* mDnsQueryEvent = addDnsQueryEvent(statp->event);
        mDnsQueryEvent->set_cache_hit(static_cast<CacheStatus>(cache_status));
        mDnsQueryEvent->set_latency_micros(saturate_cast<int32_t>(queryStopwatch.timeTakenUs()));
@@ -1215,7 +1216,7 @@ static int send_dg(ResState* statp, res_params* params, const uint8_t* buf, int
static int send_mdns(ResState* statp, std::span<const uint8_t> buf, uint8_t* ans, int anssiz,
                     int* terrno, int* rcode) {
    const sockaddr_storage ss =
            (getQueryType(buf.data(), buf.size()) == T_AAAA) ? mdns_addrs[0] : mdns_addrs[1];
            (getQueryType(buf.data(), buf.size()) == NS_T_AAAA) ? mdns_addrs[0] : mdns_addrs[1];
    const sockaddr* mdnsap = reinterpret_cast<const sockaddr*>(&ss);
    unique_fd fd;