1
0
Fork 0

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>
zero-colors
Gao Feng 2016-10-18 08:57:50 +08:00 committed by David S. Miller
parent 7cafb0ba14
commit 9c403b6bee
1 changed files with 2 additions and 2 deletions

View File

@ -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();