mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
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>
This commit is contained in:
parent
7cafb0ba14
commit
9c403b6bee
@ -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();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user