提交 9c403b6b 编写于 作者: G Gao Feng 提交者: David S. Miller

net: vlan: Use sizeof instead of literal number

Use sizeof variable instead of literal number to enhance the readability.
Signed-off-by: NGao Feng <fgao@ikuai8.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 7cafb0ba
...@@ -515,8 +515,8 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) ...@@ -515,8 +515,8 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg)
return -EFAULT; return -EFAULT;
/* Null terminate this sucker, just in case. */ /* Null terminate this sucker, just in case. */
args.device1[23] = 0; args.device1[sizeof(args.device1) - 1] = 0;
args.u.device2[23] = 0; args.u.device2[sizeof(args.u.device2) - 1] = 0;
rtnl_lock(); rtnl_lock();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册