]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
force promotion to unsigned int
authorMark Andrews <marka@isc.org>
Thu, 14 Mar 2019 08:46:10 +0000 (19:46 +1100)
committerEvan Hunt <each@isc.org>
Thu, 14 Mar 2019 20:51:30 +0000 (13:51 -0700)
(cherry picked from commit 1eba2c5b060c1e8f30658f0f834ecc7fe0dac492)

lib/dns/byaddr.c

index 0ef75a34b5d553da268a1d534886d284cc9b0755..e7104edb58f63e80bc1a44a3616c1f203adbe9fd 100644 (file)
@@ -67,10 +67,10 @@ dns_byaddr_createptrname(const 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;