From patchwork Wed Dec 9 20:09:30 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Lunn X-Patchwork-Id: 5176 Return-Path: Received: from londo.lunn.ch (londo.lunn.ch [80.238.139.98]) by open-mesh.net (Postfix) with ESMTP id 517031543C0 for ; Wed, 9 Dec 2009 20:55:24 +0000 (UTC) Received: from lunn by londo.lunn.ch with local (Exim 3.36 #1 (Debian)) id 1NISrf-0000If-00; Wed, 09 Dec 2009 21:10:23 +0100 From: Andrew Lunn To: gregkh@suse.de Date: Wed, 9 Dec 2009 21:09:30 +0100 Message-Id: <1260389373-1071-8-git-send-email-andrew@lunn.ch> X-Mailer: git-send-email 1.6.5.4 In-Reply-To: <1260389373-1071-7-git-send-email-andrew@lunn.ch> References: <1260389373-1071-1-git-send-email-andrew@lunn.ch> <1260389373-1071-2-git-send-email-andrew@lunn.ch> <1260389373-1071-3-git-send-email-andrew@lunn.ch> <1260389373-1071-4-git-send-email-andrew@lunn.ch> <1260389373-1071-5-git-send-email-andrew@lunn.ch> <1260389373-1071-6-git-send-email-andrew@lunn.ch> <1260389373-1071-7-git-send-email-andrew@lunn.ch> Sender: Andrew Lunn Cc: devel@driverdev.osuosl.org, b.a.t.m.a.n@lists.open-mesh.net Subject: [B.A.T.M.A.N.] [PATCH 07/10] staging:batman-adv:Updating orig_str for debug X-BeenThere: b.a.t.m.a.n@lists.open-mesh.net X-Mailman-Version: 2.1.11 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: Wed, 09 Dec 2009 20:55:24 -0000 From: marek In commit 1488 the orig_str has been removed from purge_orig_neighbours(). Apparently, this breaks compilation when enabling debug-flags, as bat_dbg() is expecting this variable as a parameter. Actually, this variable has never been initialised also before commit 1488 (which was probably the reason for mistakenly removing it). This tiny patch adds the orig_str again, but initialises it now as well. Signed-off-by: Linus Luessing Signed-off-by: Andrew Lunn git-svn-id: http://downloads.open-mesh.net/svn/batman/trunk/batman-adv-kernelland@1490 45894c77-fb22-0410-b583-ff6e7d5dbf6c --- originator.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/originator.c b/originator.c index d0640a7..9962af7 100644 --- a/originator.c +++ b/originator.c @@ -163,7 +163,7 @@ static bool purge_orig_neigbours(struct orig_node *orig_node, struct neigh_node **best_neigh_node) { struct list_head *list_pos, *list_pos_tmp; - char neigh_str[ETH_STR_LEN]; + char neigh_str[ETH_STR_LEN], orig_str[ETH_STR_LEN]; struct neigh_node *neigh_node; bool neigh_purged = false; @@ -179,6 +179,7 @@ static bool purge_orig_neigbours(struct orig_node *orig_node, ((PURGE_TIMEOUT * HZ) / 1000)))) { addr_to_string(neigh_str, neigh_node->addr); + addr_to_string(orig_str, orig_node->orig); bat_dbg(DBG_BATMAN, "Neighbour timeout: originator %s, neighbour: %s, last_valid %lu\n", orig_str, neigh_str, (neigh_node->last_valid / HZ)); neigh_purged = true;