mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-09-02 15:45:25 +00:00
case to unsigned; reorder expression
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 1999-2007, 2009, 2011-2014, 2016, 2017 Internet Systems Consortium, Inc. ("ISC")
|
* Copyright (C) 1999-2007, 2009, 2011-2014, 2016-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
|
||||||
@@ -1281,8 +1281,8 @@ remove_old_tsversions(isc_logfile_t *file, int versions) {
|
|||||||
&digit_end, 10);
|
&digit_end, 10);
|
||||||
if (*digit_end == '\0') {
|
if (*digit_end == '\0') {
|
||||||
int i = 0;
|
int i = 0;
|
||||||
while (version < to_keep[i] &&
|
while (i < versions &&
|
||||||
i < versions)
|
version < to_keep[i])
|
||||||
{
|
{
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
@@ -1353,7 +1353,7 @@ roll_increment(isc_logfile_t *file) {
|
|||||||
*/
|
*/
|
||||||
for (greatest = 0; greatest < INT_MAX; greatest++) {
|
for (greatest = 0; greatest < INT_MAX; greatest++) {
|
||||||
n = snprintf(current, sizeof(current),
|
n = snprintf(current, sizeof(current),
|
||||||
"%s.%u", path, greatest) ;
|
"%s.%u", path, (unsigned)greatest) ;
|
||||||
if (n >= (int)sizeof(current) || n < 0 ||
|
if (n >= (int)sizeof(current) || n < 0 ||
|
||||||
!isc_file_exists(current))
|
!isc_file_exists(current))
|
||||||
{
|
{
|
||||||
@@ -1380,13 +1380,14 @@ roll_increment(isc_logfile_t *file) {
|
|||||||
|
|
||||||
for (i = greatest; i > 0; i--) {
|
for (i = greatest; i > 0; i--) {
|
||||||
result = ISC_R_SUCCESS;
|
result = ISC_R_SUCCESS;
|
||||||
n = snprintf(current, sizeof(current), "%s.%u", path, i - 1);
|
n = snprintf(current, sizeof(current), "%s.%u", path,
|
||||||
|
(unsigned)(i - 1));
|
||||||
if (n >= (int)sizeof(current) || n < 0) {
|
if (n >= (int)sizeof(current) || n < 0) {
|
||||||
result = ISC_R_NOSPACE;
|
result = ISC_R_NOSPACE;
|
||||||
}
|
}
|
||||||
if (result == ISC_R_SUCCESS) {
|
if (result == ISC_R_SUCCESS) {
|
||||||
n = snprintf(newpath, sizeof(newpath), "%s.%u",
|
n = snprintf(newpath, sizeof(newpath), "%s.%u",
|
||||||
path, i);
|
path, (unsigned)i);
|
||||||
if (n >= (int)sizeof(newpath) || n < 0) {
|
if (n >= (int)sizeof(newpath) || n < 0) {
|
||||||
result = ISC_R_NOSPACE;
|
result = ISC_R_NOSPACE;
|
||||||
}
|
}
|
||||||
|
@@ -3960,7 +3960,7 @@
|
|||||||
./lib/isc/lex.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2013,2014,2015,2016,2017
|
./lib/isc/lex.c C 1998,1999,2000,2001,2002,2003,2004,2005,2007,2013,2014,2015,2016,2017
|
||||||
./lib/isc/lfsr.c C 1999,2000,2001,2002,2004,2005,2007,2016
|
./lib/isc/lfsr.c C 1999,2000,2001,2002,2004,2005,2007,2016
|
||||||
./lib/isc/lib.c C 1999,2000,2001,2004,2005,2007,2009,2013,2014,2015,2016
|
./lib/isc/lib.c C 1999,2000,2001,2004,2005,2007,2009,2013,2014,2015,2016
|
||||||
./lib/isc/log.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2011,2012,2013,2014,2016,2017
|
./lib/isc/log.c C 1999,2000,2001,2002,2003,2004,2005,2006,2007,2009,2011,2012,2013,2014,2016,2017,2018
|
||||||
./lib/isc/md5.c C 2000,2001,2004,2005,2007,2009,2014,2015,2016,2017,2018
|
./lib/isc/md5.c C 2000,2001,2004,2005,2007,2009,2014,2015,2016,2017,2018
|
||||||
./lib/isc/mem.c C 1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018
|
./lib/isc/mem.c C 1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2012,2013,2014,2015,2016,2017,2018
|
||||||
./lib/isc/mips/Makefile.in MAKE 2007,2012,2016
|
./lib/isc/mips/Makefile.in MAKE 2007,2012,2016
|
||||||
|
Reference in New Issue
Block a user