Commit 97d4a1ea authored by Mark Andrews's avatar Mark Andrews

use %u and preserve unsigned property

parent b5167607
/* /*
* Copyright (C) 2011-2017 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 2011-2018 Internet Systems Consortium, Inc. ("ISC")
* *
* This Source Code Form is subject to the terms of the Mozilla Public * This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
...@@ -703,12 +703,12 @@ ip2name(const dns_rpz_cidr_key_t *tgt_ip, dns_rpz_prefix_t tgt_prefix, ...@@ -703,12 +703,12 @@ ip2name(const dns_rpz_cidr_key_t *tgt_ip, dns_rpz_prefix_t tgt_prefix,
int i, n, len; int i, n, len;
if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) { if (KEY_IS_IPV4(tgt_prefix, tgt_ip)) {
len = snprintf(str, sizeof(str), "%d.%d.%d.%d.%d", len = snprintf(str, sizeof(str), "%u.%u.%u.%u.%u",
tgt_prefix - 96, tgt_prefix - 96U,
tgt_ip->w[3] & 0xff, tgt_ip->w[3] & 0xffU,
(tgt_ip->w[3]>>8) & 0xff, (tgt_ip->w[3]>>8) & 0xffU,
(tgt_ip->w[3]>>16) & 0xff, (tgt_ip->w[3]>>16) & 0xffU,
(tgt_ip->w[3]>>24) & 0xff); (tgt_ip->w[3]>>24) & 0xffU);
if (len < 0 || len > (int)sizeof(str)) { if (len < 0 || len > (int)sizeof(str)) {
return (ISC_R_FAILURE); return (ISC_R_FAILURE);
} }
......
...@@ -3653,7 +3653,7 @@ ...@@ -3653,7 +3653,7 @@
./lib/dns/resolver.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 ./lib/dns/resolver.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018
./lib/dns/result.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017 ./lib/dns/result.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017
./lib/dns/rootns.c C 1999,2000,2001,2002,2004,2005,2007,2008,2010,2012,2013,2014,2015,2016,2017 ./lib/dns/rootns.c C 1999,2000,2001,2002,2004,2005,2007,2008,2010,2012,2013,2014,2015,2016,2017
./lib/dns/rpz.c C 2011,2012,2013,2014,2015,2016,2017 ./lib/dns/rpz.c C 2011,2012,2013,2014,2015,2016,2017,2018
./lib/dns/rriterator.c C 2009,2011,2012,2015,2016 ./lib/dns/rriterator.c C 2009,2011,2012,2015,2016
./lib/dns/rrl.c C 2012,2013,2014,2015,2016,2017 ./lib/dns/rrl.c C 2012,2013,2014,2015,2016,2017
./lib/dns/sdb.c C 2000,2001,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018 ./lib/dns/sdb.c C 2000,2001,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment