From: "Linus Lüssing" <linus.luessing@web.de>
To: b.a.t.m.a.n@lists.open-mesh.org
Subject: [B.A.T.M.A.N.] [PATCH 2/5] batman-adv: Make gateway_get_selected type safe
Date: Sun, 13 Mar 2011 20:52:22 +0100 [thread overview]
Message-ID: <1300045945-28734-3-git-send-email-linus.luessing@web.de> (raw)
In-Reply-To: <1300045945-28734-1-git-send-email-linus.luessing@web.de>
Make the return value explicit instead of (void *).
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
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);
--
1.7.4.1
next prev parent reply other threads:[~2011-03-13 19:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-13 19:52 [B.A.T.M.A.N.] Various fixes and clean-ups Linus Lüssing
2011-03-13 19:52 ` [B.A.T.M.A.N.] [PATCH 1/5] batman-adv: Move bonding / iface alternating router search to own functions Linus Lüssing
2011-03-13 19:52 ` Linus Lüssing [this message]
2011-03-13 19:52 ` [B.A.T.M.A.N.] [PATCH 3/5] batman-adv: Simplify gw_check_election(), use gw_get_selected() Linus Lüssing
2011-03-13 19:52 ` [B.A.T.M.A.N.] [PATCH 4/5] batman-adv: Make orig_node->router an rcu protected pointer Linus Lüssing
2011-03-13 19:52 ` [B.A.T.M.A.N.] [PATCH 5/5] batman-adv: Protect global TQ window with a spinlock Linus Lüssing
2011-03-14 22:48 ` [B.A.T.M.A.N.] Various fixes and clean-ups Marek Lindner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1300045945-28734-3-git-send-email-linus.luessing@web.de \
--to=linus.luessing@web.de \
--cc=b.a.t.m.a.n@lists.open-mesh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox