[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1375774371-831-2-git-send-email-sakiwit@gmail.com>
Date: Tue, 6 Aug 2013 01:32:50 -0600
From: Jean Sacren <sakiwit@...il.com>
To: netdev@...r.kernel.org
Subject: [PATCH net-next 2/3] netdevice: remove useless else keyword
Clean up multiple useless else keywords. Add empty lines for
readability.
Signed-off-by: Jean Sacren <sakiwit@...il.com>
---
net/core/dev.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 58eb802..1b0bea8 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -1062,9 +1062,11 @@ static int dev_get_valid_name(struct net *net,
if (strchr(name, '%'))
return dev_alloc_name_ns(net, dev, name);
- else if (__dev_get_by_name(net, name))
+
+ if (__dev_get_by_name(net, name))
return -EEXIST;
- else if (dev->name != name)
+
+ if (dev->name != name)
strlcpy(dev->name, name, IFNAMSIZ);
return 0;
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists