Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37793289
en ru br
Репозитории ALT
S:4.4.3.P1-alt1
5.1: 3.0.7-alt4
4.1: 3.0.6-alt2.M41.1
4.0: 3.0.6-alt1
3.0: 3.0.2-alt1
www.altlinux.org/Changes

Группа :: Система/Серверы
Пакет: dhcp

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: 0032-Fix-printf-format.patch
Скачать


From 0 Mon Sep 17 00:00:00 2001
From: Mikhail Efremov <sem@altlinux.org>
Date: Thu, 6 Dec 2018 21:51:21 +0300
Subject: [PATCH 32] Fix printf format
Type isc_uint64_t is uint64_t which can be different type on different
platforms. Just use PRIu64.
diff --git a/dhcp/server/dhcpv6.c b/dhcp/server/dhcpv6.c
index defaced..defaced 100644
--- a/dhcp/server/dhcpv6.c
+++ b/dhcp/server/dhcpv6.c
@@ -1020,12 +1020,12 @@ void check_pool6_threshold(struct reply_state *reply,
 			pond->low_threshold = 0;
 			pond->logged = 0;
 			log_error("Pool threshold reset - shared subnet: %s; "
-				  "address: %s; low threshold %llu/%llu.",
+				  "address: %s; low threshold %" PRIu64 "/%" PRIu64 ".",
 				  shared_name,
 				  inet_ntop(AF_INET6, &lease->addr,
 					    tmp_addr, sizeof(tmp_addr)),
-				  (long long unsigned)(used),
-				  (long long unsigned)(count));
+				  used,
+				  count);
 		}
 		return;
 	}
@@ -1054,11 +1054,11 @@ void check_pool6_threshold(struct reply_state *reply,
 
 	/* we've exceeded it, output a message */
 	log_error("Pool threshold exceeded - shared subnet: %s; "
-		  "address: %s; high threshold %d%% %llu/%llu.",
+		  "address: %s; high threshold %d%% %" PRIu64 "/%" PRIu64 ".",
 		  shared_name,
 		  inet_ntop(AF_INET6, &lease->addr, tmp_addr, sizeof(tmp_addr)),
-		  poolhigh, (long long unsigned)(used),
-		  (long long unsigned)(count));
+		  poolhigh, used,
+		  count);
 
 	/* handle the low threshold now, if we don't
 	 * have one we default to 0. */
@@ -1427,16 +1427,13 @@ pick_v6_address(struct reply_state *reply)
 	if (jumbo_range != 0) {
 		log_debug("Unable to pick client address: "
 			  "no addresses available  - shared network %s: "
-			  " 2^64-1 < total, %llu active,  %llu abandoned",
-			  shared_name, (long long unsigned)(active - abandoned),
-			  (long long unsigned)(abandoned));
+			  " 2^64-1 < total, %" PRIu64 " active,  %" PRIu64 " abandoned",
+			  shared_name, active - abandoned, abandoned);
 	} else {
 		log_debug("Unable to pick client address: "
 			  "no addresses available  - shared network %s: "
-			  "%llu total, %llu active,  %llu abandoned",
-			  shared_name, (long long unsigned)(total),
-			  (long long unsigned)(active - abandoned),
-		          (long long unsigned)(abandoned));
+			  "%" PRIu64 " total, %" PRIu64 " active,  %" PRIu64 " abandoned",
+			  shared_name, total, active - abandoned, abandoned);
 	}
 
 	return ISC_R_NORESOURCES;
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin