From 8a85e3d92479ae3c9dd979a51570ab335b310c26 Mon Sep 17 00:00:00 2001 From: Mark Andrews Date: Thu, 14 Mar 2019 19:46:10 +1100 Subject: [PATCH] force promotion to unsigned int (cherry picked from commit 1eba2c5b060c1e8f30658f0f834ecc7fe0dac492) --- lib/dns/byaddr.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/dns/byaddr.c b/lib/dns/byaddr.c index 9eece308a1..1dd31b9300 100644 --- a/lib/dns/byaddr.c +++ b/lib/dns/byaddr.c @@ -79,10 +79,10 @@ dns_byaddr_createptrname2(isc_netaddr_t *address, unsigned int options, if (address->family == AF_INET) { (void)snprintf(textname, sizeof(textname), "%u.%u.%u.%u.in-addr.arpa.", - (bytes[3] & 0xffU), - (bytes[2] & 0xffU), - (bytes[1] & 0xffU), - (bytes[0] & 0xffU)); + ((unsigned int)bytes[3] & 0xffU), + ((unsigned int)bytes[2] & 0xffU), + ((unsigned int)bytes[1] & 0xffU), + ((unsigned int)bytes[0] & 0xffU)); } else if (address->family == AF_INET6) { size_t remaining;