[1/3] Staging: batman-adv: Remove useless braces

Message ID 1288908150-19744-2-git-send-email-sven.eckelmann@gmx.de (mailing list archive)
State Not Applicable, archived
Headers

Commit Message

Sven Eckelmann Nov. 4, 2010, 10:02 p.m. UTC
  77099f0afe94928b5b0066a7efa5fa9f81696b54 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>
---
 drivers/staging/batman-adv/vis.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
  

Comments

Greg KH Nov. 10, 2010, 12:21 a.m. UTC | #1
On Thu, Nov 04, 2010 at 11:02:28PM +0100, Sven Eckelmann wrote:
> 77099f0afe94928b5b0066a7efa5fa9f81696b54 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>

This isn't needed for .37, sorry.  I'll use the other version of this
and queue it up for .38.

thanks,

greg k-h
  

Patch

diff --git a/drivers/staging/batman-adv/vis.c b/drivers/staging/batman-adv/vis.c
index 3d2c1bc..4473cc8 100644
--- a/drivers/staging/batman-adv/vis.c
+++ b/drivers/staging/batman-adv/vis.c
@@ -135,9 +135,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;