b.a.t.m.a.n.lists.open-mesh.org archive mirror
 help / color / mirror / Atom feed
* [B.A.T.M.A.N.] [PATCH] batman-adv: make the use of braces in if-else consistent
@ 2014-02-18 11:03 Martin Hundebøll
  2014-02-19  6:57 ` Marek Lindner
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Hundebøll @ 2014-02-18 11:03 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Martin Hundebøll

To avoid confusion, the linux kernel coding style discourage the use
of one if-else branch with braces and another without braces.

Introduced-by: 65d8217193427026169c48112c561c5ca4d1bd18 ("batman-adv:
compat: fix null pointer exception for kernels < 3.9")

Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
---
 compat.h | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/compat.h b/compat.h
index 7beba36..0ceb2b1 100644
--- a/compat.h
+++ b/compat.h
@@ -167,8 +167,9 @@ static inline int batadv_param_set_copystring(const char *val,
 		rcu_read_unlock(); \
 		dev_hold(dev); \
 		return dev; \
-	} else \
-		dev = NULL;
+	} else {\
+		dev = NULL; \
+	}
 
 #endif /* < KERNEL_VERSION(2, 6, 36) */
 
-- 
1.9.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [B.A.T.M.A.N.] [PATCH] batman-adv: make the use of braces in if-else consistent
  2014-02-18 11:03 [B.A.T.M.A.N.] [PATCH] batman-adv: make the use of braces in if-else consistent Martin Hundebøll
@ 2014-02-19  6:57 ` Marek Lindner
  0 siblings, 0 replies; 2+ messages in thread
From: Marek Lindner @ 2014-02-19  6:57 UTC (permalink / raw)
  To: b.a.t.m.a.n; +Cc: Martin Hundebøll

[-- Attachment #1: Type: text/plain, Size: 528 bytes --]

On Tuesday 18 February 2014 12:03:55 Martin Hundebøll wrote:
> To avoid confusion, the linux kernel coding style discourage the use
> of one if-else branch with braces and another without braces.
> 
> Introduced-by: 65d8217193427026169c48112c561c5ca4d1bd18 ("batman-adv:
> compat: fix null pointer exception for kernels < 3.9")
> 
> Signed-off-by: Martin Hundebøll <martin@hundeboll.net>
> ---
>  compat.h | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)

Applied in revision 534aa4a.

Thanks,
Marek

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 490 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-02-19  6:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-02-18 11:03 [B.A.T.M.A.N.] [PATCH] batman-adv: make the use of braces in if-else consistent Martin Hundebøll
2014-02-19  6:57 ` Marek Lindner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).