From: Antonio Quartulli <antonio@meshcoding.com>
To: b.a.t.m.a.n@lists.open-mesh.org
Cc: Antonio Quartulli <antonio@meshcoding.com>
Subject: [B.A.T.M.A.N.] [PATCH next 09/11] batman-adv: fix code style
Date: Mon, 17 Mar 2014 14:22:52 +0100 [thread overview]
Message-ID: <1395062574-28291-9-git-send-email-antonio@meshcoding.com> (raw)
In-Reply-To: <1395062574-28291-1-git-send-email-antonio@meshcoding.com>
- don't split lines if shorter than 80 chars
- don't use goto if there is no cleanup to perform
Introduced by 90ad6a40c80323805be1e86504385de2bd861f0a
("batman-adv: Modified forwarding behaviour for multicast packets")
Cc: Linux Lüssing <linus.luessing@web.de>
Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
---
multicast.c | 3 +--
multicast.h | 8 ++++----
translation-table.c | 5 ++---
3 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/multicast.c b/multicast.c
index 425978d..5a39fc1 100644
--- a/multicast.c
+++ b/multicast.c
@@ -318,8 +318,7 @@ static int batadv_mcast_forw_mode_check_ipv6(struct batadv_priv *bat_priv,
/* TODO: Implement Multicast Router Discovery (RFC4286),
* then allow scope > link local, too
*/
- if (IPV6_ADDR_MC_SCOPE(&ip6hdr->daddr) !=
- IPV6_ADDR_SCOPE_LINKLOCAL)
+ if (IPV6_ADDR_MC_SCOPE(&ip6hdr->daddr) != IPV6_ADDR_SCOPE_LINKLOCAL)
return -EINVAL;
/* link-local-all-nodes multicast listeners behind a bridge are
diff --git a/multicast.h b/multicast.h
index 2861899..73b5d45 100644
--- a/multicast.h
+++ b/multicast.h
@@ -20,10 +20,10 @@
/**
* batadv_forw_mode - the way a packet should be forwarded as
- * @BATADV_FORW_ALL: forward the packet to all nodes
- * (currently via classic flooding)
- * @BATADV_FORW_SINGLE: forward the packet to a single node
- * (currently via the BATMAN unicast routing protocol)
+ * @BATADV_FORW_ALL: forward the packet to all nodes (currently via classic
+ * flooding)
+ * @BATADV_FORW_SINGLE: forward the packet to a single node (currently via the
+ * BATMAN unicast routing protocol)
* @BATADV_FORW_NONE: don't forward, drop it
*/
enum batadv_forw_mode {
diff --git a/translation-table.c b/translation-table.c
index dab5c39..d636bde 100644
--- a/translation-table.c
+++ b/translation-table.c
@@ -206,16 +206,15 @@ int batadv_tt_global_hash_count(struct batadv_priv *bat_priv,
const uint8_t *addr, unsigned short vid)
{
struct batadv_tt_global_entry *tt_global_entry;
- int count = 0;
+ int count;
tt_global_entry = batadv_tt_global_hash_find(bat_priv, addr, vid);
if (!tt_global_entry)
- goto out;
+ return 0;
count = atomic_read(&tt_global_entry->orig_list_count);
batadv_tt_global_entry_free_ref(tt_global_entry);
-out:
return count;
}
--
1.8.3.2
next prev parent reply other threads:[~2014-03-17 13:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-17 13:22 [B.A.T.M.A.N.] [PATCH next 01/11] batman-adv: remove useless goto Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 02/11] batman-adv: don't mess up with the netdev refcounting if not needed Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 03/11] batman-adv: fix multicast kerneldoc Antonio Quartulli
2014-03-17 16:13 ` Martin Hundebøll
2014-03-17 16:32 ` Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 04/11] " Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 05/11] " Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 06/11] " Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 07/11] " Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 08/11] batman-adv: adjust copyright disclaimer in multicast files Antonio Quartulli
2014-03-17 13:22 ` Antonio Quartulli [this message]
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 10/11] batman-adv: fix more code style Antonio Quartulli
2014-03-17 16:19 ` Martin Hundebøll
2014-03-17 16:33 ` Antonio Quartulli
2014-03-17 13:22 ` [B.A.T.M.A.N.] [PATCH next 11/11] " Antonio Quartulli
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=1395062574-28291-9-git-send-email-antonio@meshcoding.com \
--to=antonio@meshcoding.com \
--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