From 756b493e7678b74ff5f168271c88019fd21f6b3d Mon Sep 17 00:00:00 2001 From: Brad House Date: Tue, 14 Nov 2023 13:16:36 -0500 Subject: [PATCH] try to cleanup bogus compiler warnings --- src/lib/ares_dns_parse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/ares_dns_parse.c b/src/lib/ares_dns_parse.c index 8e837696..8d23a601 100644 --- a/src/lib/ares_dns_parse.c +++ b/src/lib/ares_dns_parse.c @@ -405,8 +405,8 @@ static ares_status_t ares_dns_parse_rr_opt(ares__buf_t *buf, ares_dns_rr_t *rr, /* First 8 bits of TTL are an extended RCODE, and they go in the higher order * after the original 4-bit rcode */ - rcode_high = (unsigned short)(raw_ttl >> 20); - rr->parent->raw_rcode |= (unsigned short)(rcode_high & 0xFF0); + rcode_high = (unsigned short)((raw_ttl >> 20) & 0x0FF0); + rr->parent->raw_rcode |= rcode_high; status = ares_dns_rr_set_u8(rr, ARES_RR_OPT_VERSION, (unsigned char)(raw_ttl >> 16) & 0xFF);