From patchwork Sun Feb 16 09:27:58 2014 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: 3843 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=212.227.15.4; helo=mout.web.de; envelope-from=linus.luessing@web.de; receiver=b.a.t.m.a.n@lists.open-mesh.org Received: from mout.web.de (mout.web.de [212.227.15.4]) by open-mesh.org (Postfix) with ESMTPS id 01B356002EC for ; Sun, 16 Feb 2014 10:27:15 +0100 (CET) Received: from localhost ([89.244.71.125]) by smtp.web.de (mrweb101) with ESMTPSA (Nemesis) id 0LoYjO-1WvCm01CtW-00gajj for ; Sun, 16 Feb 2014 10:27:14 +0100 From: =?UTF-8?q?Linus=20L=C3=BCssing?= To: b.a.t.m.a.n@lists.open-mesh.org Date: Sun, 16 Feb 2014 10:27:58 +0100 Message-Id: <1392542878-17033-1-git-send-email-linus.luessing@web.de> X-Mailer: git-send-email 1.9.0.rc3 MIME-Version: 1.0 X-Provags-ID: V03:K0:e0ol5Owuzq4Fb5N5Q2vBVnnPT8P9+bZF1ZOoBSI8lW6gVOPt256 NxzSu6x7JE+OsWUvOTF0hPPMIawj/qNyGcsNBu8nDLuevyPfOdTJCWlutsUhn/zGN32v0x3 gUNbu/HHU4t5rB5ww7Tc+aHdkz2yJN3RaXOnn2jRY1SssoUtRESycGO117qeJuSEL0eG8Ni J6cYLLIv/H5doO4PqGIYw== Subject: [B.A.T.M.A.N.] [PATCHv2] batman-adv: return NULL instead of 0 in batadv_mcast_forw_ip_node_get() X-BeenThere: b.a.t.m.a.n@lists.open-mesh.org X-Mailman-Version: 2.1.15 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, 16 Feb 2014 09:27:16 -0000 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 Signed-off-by: Linus Lüssing --- * 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; } }