mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +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
1 changed files with 2 additions and 2 deletions
|
@ -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 a new issue