batman-adv: Remove useless braces

Message ID 1287873742-5039-1-git-send-email-sven.eckelmann@gmx.de (mailing list archive)
State Accepted, archived
Headers

Commit Message

Sven Eckelmann Oct. 23, 2010, 10:42 p.m. UTC
  54466268785c9892d6e2af2ac2a54a684face022 added changes to vis.c which
trigger a checkpatch.pl warning about braces which are not necessary
anymore.

WARNING: braces {} are not necessary for any arm of this statement
+               if (entry->primary)
[...]
+               else {
[...]

Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
---
 batman-adv/vis.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
  

Comments

Marek Lindner Oct. 25, 2010, 1:02 p.m. UTC | #1
On Sunday 24 October 2010 00:42:22 Sven Eckelmann wrote:
> 54466268785c9892d6e2af2ac2a54a684face022 added changes to vis.c which
> trigger a checkpatch.pl warning about braces which are not necessary
> anymore.

Applied in revision 1850.

Thanks,
Marek
  

Patch

diff --git a/batman-adv/vis.c b/batman-adv/vis.c
index bde423a..5aea153 100644
--- a/batman-adv/vis.c
+++ b/batman-adv/vis.c
@@ -136,9 +136,8 @@  static ssize_t vis_data_read_prim_sec(char *buff, struct hlist_head *if_list)
 	hlist_for_each_entry(entry, pos, if_list, list) {
 		if (entry->primary)
 			len += sprintf(buff + len, "PRIMARY, ");
-		else {
+		else
 			len += sprintf(buff + len,  "SEC %pM, ", entry->addr);
-		}
 	}
 
 	return len;