2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-31 06:25:31 +00:00

shift unsigned (~0U) rather than signed (~0) contant

This commit is contained in:
Mark Andrews
2018-02-15 00:41:13 +11:00
parent 75a291e541
commit 34a4d241c6
2 changed files with 5 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (C) 1999-2009, 2014-2017 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 1999-2009, 2014-2018 Internet Systems Consortium, Inc. ("ISC")
*
* 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
@@ -555,7 +555,8 @@ internal_current4(isc_interfaceiter_t *iter) {
bits = 8 - prefixlen;
prefixlen = 0;
}
iter->current.netmask.type.in6.s6_addr[i] = (~0 << bits) & 0xff;
iter->current.netmask.type.in6.s6_addr[i] =
(~0U << bits) & 0xff;
}
return (ISC_R_SUCCESS);
@@ -749,7 +750,7 @@ internal_current6(isc_interfaceiter_t *iter) {
bits = lifreq.lifr_addrlen - i;
bits = (bits < 8) ? (8 - bits) : 0;
iter->current.netmask.type.in6.s6_addr[i / 8] =
(~0 << bits) & 0xff;
(~0U << bits) & 0xff;
}
return (ISC_R_SUCCESS);

View File

@@ -4077,7 +4077,7 @@
./lib/isc/unix/file.c C 2000,2001,2002,2004,2005,2007,2009,2011,2012,2013,2014,2015,2016,2017
./lib/isc/unix/fsaccess.c C 2000,2001,2004,2005,2006,2007,2016
./lib/isc/unix/ifiter_getifaddrs.c C 2003,2004,2005,2007,2008,2009,2014,2016
./lib/isc/unix/ifiter_ioctl.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2014,2015,2016,2017
./lib/isc/unix/ifiter_ioctl.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2014,2015,2016,2017,2018
./lib/isc/unix/ifiter_sysctl.c C 1999,2000,2001,2002,2003,2004,2005,2007,2014,2015,2016
./lib/isc/unix/include/Makefile.in MAKE 1998,1999,2000,2001,2004,2007,2012,2014,2016
./lib/isc/unix/include/isc/Makefile.in MAKE 1998,1999,2000,2001,2004,2007,2012,2013,2014,2015,2016