[commits] batctl; branch, next, updated. v2011.2.0-37-g219bc39

postmaster at open-mesh.org postmaster at open-mesh.org
Sat Jul 9 01:07:08 CEST 2011


The following commit has been merged in the next branch:
commit 64f974f5ae8668292af035a90f0b8cca5bbe82ce
Author: Marek Lindner <lindner_marek at yahoo.de>
Date:   Wed Jul 6 17:00:32 2011 +0200

    batctl: avoid uninitialized variable when compiling bisect
    
    Reported-by: Max Ip <ipmax2011 at googlemail.com>
    Signed-off-by: Marek Lindner <lindner_marek at yahoo.de>

diff --git a/bisect.c b/bisect.c
index f6f171e..d3789aa 100644
--- a/bisect.c
+++ b/bisect.c
@@ -194,7 +194,7 @@ static int routing_table_new(char *orig, char *next_hop, char *old_next_hop, cha
 	struct seqno_event *seqno_event;
 	struct rt_table *rt_table, *prev_rt_table = NULL;
 	struct rt_hist *rt_hist;
-	int i, j;
+	int i, j = -1;
 
 	if (!curr_bat_node) {
 		fprintf(stderr, "Routing table change without preceding OGM - skipping");
@@ -331,7 +331,6 @@ static int routing_table_new(char *orig, char *next_hop, char *old_next_hop, cha
 	}
 
 	if (prev_rt_table) {
-		j = -1;
 		for (i = 0; i < prev_rt_table->num_entries; i++) {
 			/* if we have a previously deleted item don't copy it over */
 			if (prev_rt_table->entries[i].flags == RT_FLAG_DELETE) {

-- 
batctl


More information about the commits mailing list