From patchwork Mon Dec 1 18:56:59 2008 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sven Eckelmann X-Patchwork-Id: 5364 Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by open-mesh.net (8.13.4/8.13.4/Debian-3sarge3) with SMTP id mB1J3jnX005365 for ; Mon, 1 Dec 2008 20:03:47 +0100 Received: (qmail invoked by alias); 01 Dec 2008 18:57:57 -0000 Received: from unknown (EHLO localhost) [89.246.207.63] by mail.gmx.net (mp066) with SMTP; 01 Dec 2008 19:57:57 +0100 X-Authenticated: #15668376 X-Provags-ID: V01U2FsdGVkX19Gqp9f2KJGfqRFaAScRO9kzRGK5kZ4956R1ERug3 pah3Mog36Fbf7G From: Sven Eckelmann To: b.a.t.m.a.n@open-mesh.net Date: Mon, 1 Dec 2008 19:56:59 +0100 Message-Id: <1228157822-29406-5-git-send-email-sven.eckelmann@gmx.de> X-Mailer: git-send-email 1.6.0.4 In-Reply-To: <1228157822-29406-1-git-send-email-sven.eckelmann@gmx.de> References: <1228157822-29406-1-git-send-email-sven.eckelmann@gmx.de> X-Y-GMX-Trusted: 0 X-FuHaFi: 0.44 Subject: [B.A.T.M.A.N.] [PATCH] Respect (un)signess of parameter in printf format strings X-BeenThere: b.a.t.m.a.n@open-mesh.net X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Dec 2008 19:03:47 -0000 Signed-off-by: Sven Eckelmann --- batman/batman.h | 2 +- batman/linux/route.c | 2 +- batman/posix/init.c | 2 +- batman/posix/unix_socket.c | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/batman/batman.h b/batman/batman.h index c69f83a..bac3a82 100644 --- a/batman/batman.h +++ b/batman/batman.h @@ -77,7 +77,7 @@ #define JITTER 100 #define TTL 50 /* Time To Live of broadcast messages */ -#define PURGE_TIMEOUT 200000 /* purge originators after time in ms if no valid packet comes in -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */ +#define PURGE_TIMEOUT 200000u /* purge originators after time in ms if no valid packet comes in -> TODO: check influence on TQ_LOCAL_WINDOW_SIZE */ #define TQ_LOCAL_WINDOW_SIZE 64 /* sliding packet range of received originator messages in squence numbers (should be a multiple of our word size) */ #define TQ_GLOBAL_WINDOW_SIZE 10 #define TQ_LOCAL_BIDRECT_SEND_MINIMUM 1 diff --git a/batman/linux/route.c b/batman/linux/route.c index e77fb63..ec5185a 100644 --- a/batman/linux/route.c +++ b/batman/linux/route.c @@ -270,7 +270,7 @@ void add_del_rule(uint32_t network, uint8_t netmask, int8_t rt_table, uint32_t p inet_ntop(AF_INET, &network, str1, sizeof (str1)); if (policy_routing_script != NULL) { - dprintf(policy_routing_pipe, "RULE %s %s %s %i %s %s %i %s %i\n", (rule_action == RULE_DEL ? "del" : "add"), rule_type_to_string[rule_type], str1, netmask, "unused", "unused", prio, iif, rt_table); + dprintf(policy_routing_pipe, "RULE %s %s %s %i %s %s %u %s %i\n", (rule_action == RULE_DEL ? "del" : "add"), rule_type_to_string[rule_type], str1, netmask, "unused", "unused", prio, iif, rt_table); return; } diff --git a/batman/posix/init.c b/batman/posix/init.c index 79d5a3b..42a8cce 100644 --- a/batman/posix/init.c +++ b/batman/posix/init.c @@ -774,7 +774,7 @@ more_hna: } else if (purge_timeout_opt) { batch_mode = 1; - snprintf(unix_buff, 20, "q:%i", purge_timeout); + snprintf(unix_buff, 20, "q:%u", purge_timeout); } else if ( info_output ) { diff --git a/batman/posix/unix_socket.c b/batman/posix/unix_socket.c index 3dda74e..d522f79 100644 --- a/batman/posix/unix_socket.c +++ b/batman/posix/unix_socket.c @@ -135,7 +135,7 @@ void internal_output(uint32_t sock) dprintf(sock, "unix_socket_path=%s\n", UNIX_PATH); dprintf(sock, "own_ogm_jitter=%i\n", JITTER); dprintf(sock, "default_ttl=%i\n", TTL); - dprintf(sock, "originator_timeout=%i (default: %i)\n", purge_timeout, PURGE_TIMEOUT); + dprintf(sock, "originator_timeout=%u (default: %u)\n", purge_timeout, PURGE_TIMEOUT); dprintf(sock, "tq_local_window_size=%i\n", TQ_LOCAL_WINDOW_SIZE); dprintf(sock, "tq_global_window_size=%i\n", TQ_GLOBAL_WINDOW_SIZE); dprintf(sock, "tq_local_bidirect_send_minimum=%i\n", TQ_LOCAL_BIDRECT_SEND_MINIMUM); @@ -491,7 +491,7 @@ void *unix_listen( void * BATMANUNUSED(arg) ) { dprintf(unix_client->sock, " --aggregation"); if (purge_timeout != PURGE_TIMEOUT) - dprintf(unix_client->sock, " --purge-timeout %i", purge_timeout); + dprintf(unix_client->sock, " --purge-timeout %u", purge_timeout); list_for_each(debug_pos, &if_list) {