From: Chen Gang <gang.chen@asianux•com>
To: kaber@trash•net, David Miller <davem@davemloft•net>
Cc: netdev <netdev@vger•kernel.org>
Subject: [PATCH] net/8021q: beautify code, name_type is unsigned int, always >= 0
Date: Thu, 28 Feb 2013 15:51:27 +0800 [thread overview]
Message-ID: <512F0C7F.1010304@asianux.com> (raw)
args.u.name_type is unsigned int, which is always >= 0
Signed-off-by: Chen Gang <gang.chen@asianux•com>
---
net/8021q/vlan.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index a187144..0f5261a 100644
--- a/net/8021q/vlan.c
+++ b/net/8021q/vlan.c
@@ -571,8 +571,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
err = -EPERM;
if (!ns_capable(net->user_ns, CAP_NET_ADMIN))
break;
- if ((args.u.name_type >= 0) &&
- (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) {
+ if (args.u.name_type < VLAN_NAME_TYPE_HIGHEST) {
struct vlan_net *vn;
vn = net_generic(net, vlan_net_id);
--
1.7.7.6
reply other threads:[~2013-02-28 7:51 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=512F0C7F.1010304@asianux.com \
--to=gang.chen@asianux$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=kaber@trash$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox