From patchwork Sun Mar 13 19:52:22 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Linus_L=C3=BCssing?= X-Patchwork-Id: 829 Return-Path: Received: from fmmailgate02.web.de (fmmailgate02.web.de [217.72.192.227]) by open-mesh.org (Postfix) with ESMTP id 610C0154120 for ; Sun, 13 Mar 2011 20:52:34 +0100 (CET) Received: from smtp01.web.de ( [172.20.0.243]) by fmmailgate02.web.de (Postfix) with ESMTP id 2E24919A63F10 for ; Sun, 13 Mar 2011 20:52:34 +0100 (CET) Received: from [46.126.246.98] (helo=localhost) by smtp01.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.110 #2) id 1PyrL7-0008M8-00; Sun, 13 Mar 2011 20:52:33 +0100 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 13 Mar 2011 20:52:22 +0100 Message-Id: <1300045945-28734-3-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1300045945-28734-1-git-send-email-linus.luessing@web.de> References: <1300045945-28734-1-git-send-email-linus.luessing@web.de> MIME-Version: 1.0 Sender: linus.luessing@web.de X-Sender: linus.luessing@web.de X-Provags-ID: V01U2FsdGVkX19zGO+8W1SAVMvX3Wr/3FMmbFAT4Z3FYm3IncaN Yaq8sS6tptgbqY2d7oFCbvM8pGaK3p3B96YsoN8x0Cqh7rrpAx Zrff6fAdJRDotQ0+ZNaw== Subject: [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: Make gateway_get_selected type safe X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.13 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: Sun, 13 Mar 2011 19:52:34 -0000 Make the return value explicit instead of (void *). Signed-off-by: Linus Lüssing --- gateway_client.c | 2 +- gateway_client.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/batman-adv/gateway_client.c b/batman-adv/gateway_client.c index 3cc4355..27b87ad 100644 --- a/batman-adv/gateway_client.c +++ b/batman-adv/gateway_client.c @@ -42,7 +42,7 @@ static void gw_node_free_ref(struct gw_node *gw_node) call_rcu(&gw_node->rcu, gw_node_free_rcu); } -void *gw_get_selected(struct bat_priv *bat_priv) +struct orig_node *gw_get_selected(struct bat_priv *bat_priv) { struct gw_node *curr_gateway_tmp; struct orig_node *orig_node = NULL; diff --git a/batman-adv/gateway_client.h b/batman-adv/gateway_client.h index 2aa4391..97c31d1 100644 --- a/batman-adv/gateway_client.h +++ b/batman-adv/gateway_client.h @@ -24,7 +24,7 @@ void gw_deselect(struct bat_priv *bat_priv); void gw_election(struct bat_priv *bat_priv); -void *gw_get_selected(struct bat_priv *bat_priv); +struct orig_node *gw_get_selected(struct bat_priv *bat_priv); void gw_check_election(struct bat_priv *bat_priv, struct orig_node *orig_node); void gw_node_update(struct bat_priv *bat_priv, struct orig_node *orig_node, uint8_t new_gwflags);