]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
use %u and preserve unsigned property
authorMark Andrews <marka@isc.org>
Thu, 15 Feb 2018 01:38:22 +0000 (12:38 +1100)
committerMark Andrews <marka@isc.org>
Fri, 16 Feb 2018 07:23:11 +0000 (18:23 +1100)
lib/dns/rpz.c
util/copyrights

index dc8c2c920443026cb7dbb8aad1c69ad671ce8929..51a97b8424553cba08c242f5e04e8dd6c1531fa2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2015  Internet Systems Consortium, Inc. ("ISC")
+ * Copyright (C) 2011-2015, 2018  Internet Systems Consortium, Inc. ("ISC")
  *
  * Permission to use, copy, modify, and/or distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
@@ -446,12 +446,12 @@ ip2name(dns_rpz_cidr_t *cidr, const dns_rpz_cidr_key_t *tgt_ip,
            tgt_ip->w[0] == 0 &&
            tgt_ip->w[1] == 0 &&
            tgt_ip->w[2] == ADDR_V4MAPPED) {
-               len = snprintf(str, sizeof(str), "%d.%d.%d.%d.%d",
-                              tgt_prefix - 96,
-                              tgt_ip->w[3] & 0xff,
-                              (tgt_ip->w[3]>>8) & 0xff,
-                              (tgt_ip->w[3]>>16) & 0xff,
-                              (tgt_ip->w[3]>>24) & 0xff);
+               len = snprintf(str, sizeof(str), "%u.%u.%u.%u.%u",
+                              tgt_prefix - 96U,
+                              tgt_ip->w[3] & 0xffU,
+                              (tgt_ip->w[3]>>8) & 0xffU,
+                              (tgt_ip->w[3]>>16) & 0xffU,
+                              (tgt_ip->w[3]>>24) & 0xffU);
                if (len == -1 || len > (int)sizeof(str))
                        return (ISC_R_FAILURE);
        } else {
index ea076f3b6505f46140cb3c0c268562f3b2649788..bd28718ec0117720a0a21dd8ff89d51a84f1daf2 100644 (file)
 ./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,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
+./lib/dns/rpz.c                                        C       2011,2012,2013,2014,2015,2018
 ./lib/dns/rriterator.c                         C       2009,2011,2012
 ./lib/dns/rrl.c                                        C       2013,2014,2015,2017
 ./lib/dns/sdb.c                                        C       2000,2001,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2015,2016,2018