diff options
author | Gao Feng <fgao@ikuai8.com> | 2016-10-18 02:57:50 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-10-18 20:23:23 +0200 |
commit | 9c403b6beeeb6cccebb745804820fdccf38125a7 (patch) | |
tree | d8234609f7baf952cf5926b92f9d08ae73315ec0 /net/8021q | |
parent | Merge branch 'smc91x-dt' (diff) | |
download | linux-9c403b6beeeb6cccebb745804820fdccf38125a7.tar.xz linux-9c403b6beeeb6cccebb745804820fdccf38125a7.zip |
net: vlan: Use sizeof instead of literal number
Use sizeof variable instead of literal number to enhance the readability.
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/8021q')
-rw-r--r-- | net/8021q/vlan.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index f8903c1e1010..9accde339601 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -515,8 +515,8 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) return -EFAULT; /* Null terminate this sucker, just in case. */ - args.device1[23] = 0; - args.u.device2[23] = 0; + args.device1[sizeof(args.device1) - 1] = 0; + args.u.device2[sizeof(args.u.device2) - 1] = 0; rtnl_lock(); |