mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-31 06:25:31 +00:00
Use the semantic patch to do the unsigned -> unsigned int change
Apply the semantic patch on the whole code base to get rid of 'unsigned' usage in favor of explicit 'unsigned int'.
This commit is contained in:
@@ -1236,7 +1236,7 @@ roll_increment(isc_logfile_t *file) {
|
||||
*/
|
||||
for (greatest = 0; greatest < INT_MAX; greatest++) {
|
||||
n = snprintf(current, sizeof(current), "%s.%u", path,
|
||||
(unsigned)greatest);
|
||||
(unsigned int)greatest);
|
||||
if (n >= (int)sizeof(current) || n < 0 ||
|
||||
!isc_file_exists(current)) {
|
||||
break;
|
||||
@@ -1263,13 +1263,13 @@ roll_increment(isc_logfile_t *file) {
|
||||
for (i = greatest; i > 0; i--) {
|
||||
result = ISC_R_SUCCESS;
|
||||
n = snprintf(current, sizeof(current), "%s.%u", path,
|
||||
(unsigned)(i - 1));
|
||||
(unsigned int)(i - 1));
|
||||
if (n >= (int)sizeof(current) || n < 0) {
|
||||
result = ISC_R_NOSPACE;
|
||||
}
|
||||
if (result == ISC_R_SUCCESS) {
|
||||
n = snprintf(newpath, sizeof(newpath), "%s.%u", path,
|
||||
(unsigned)i);
|
||||
(unsigned int)i);
|
||||
if (n >= (int)sizeof(newpath) || n < 0) {
|
||||
result = ISC_R_NOSPACE;
|
||||
}
|
||||
|
Reference in New Issue
Block a user