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.] [PATCHv2] batman-adv: return NULL instead of 0 in batadv_mcast_forw_ip_node_get()
Date: Sun, 16 Feb 2014 10:27:58 +0100 [thread overview]
Message-ID: <1392542878-17033-1-git-send-email-linus.luessing@web.de> (raw)
batadv_mcast_forw_ip_node_get() returns a pointer, so returning NULL in
error cases is always more appropriate than 0.
Introduced by: c8fedbea81eac41a4971bb43353fd52a903d7c4c
("batman-adv: Send multicast packets to nodes with a WANT_ALL flag")
Reported-by: Antonio Quartulli <antonio@meshcoding.com>
Signed-off-by: Linus Lüssing <linus.luessing@web.de>
---
* added Reported-by
multicast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/multicast.c b/multicast.c
index b2abe00..00bb30e 100644
--- a/multicast.c
+++ b/multicast.c
@@ -498,7 +498,7 @@ batadv_mcast_forw_ip_node_get(struct batadv_priv *bat_priv,
return batadv_mcast_forw_ipv6_node_get(bat_priv);
default:
/* we shouldn't be here... */
- return 0;
+ return NULL;
}
}
--
1.7.10.4
next reply other threads:[~2014-02-16 9:27 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-16 9:27 Linus Lüssing [this message]
2014-02-16 9:34 ` [B.A.T.M.A.N.] [PATCHv2] batman-adv: return NULL instead of 0 in batadv_mcast_forw_ip_node_get() 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=1392542878-17033-1-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