Commit 12039046 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

tun/tap: use paren's with sizeof

Although sizeof is an operator in C. The kernel coding style convention
is to always use it like a function and add parenthesis.
Signed-off-by: default avatarStephen Hemminger <stephen@networkplumber.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6b0355f4
...@@ -1215,7 +1215,7 @@ int tap_queue_resize(struct tap_dev *tap) ...@@ -1215,7 +1215,7 @@ int tap_queue_resize(struct tap_dev *tap)
int n = tap->numqueues; int n = tap->numqueues;
int ret, i = 0; int ret, i = 0;
arrays = kmalloc(sizeof *arrays * n, GFP_KERNEL); arrays = kmalloc_array(n, sizeof(*arrays), GFP_KERNEL);
if (!arrays) if (!arrays)
return -ENOMEM; return -ENOMEM;
......
...@@ -2737,7 +2737,7 @@ static int tun_queue_resize(struct tun_struct *tun) ...@@ -2737,7 +2737,7 @@ static int tun_queue_resize(struct tun_struct *tun)
int n = tun->numqueues + tun->numdisabled; int n = tun->numqueues + tun->numdisabled;
int ret, i; int ret, i;
arrays = kmalloc(sizeof *arrays * n, GFP_KERNEL); arrays = kmalloc_array(n, sizeof(*arrays), GFP_KERNEL);
if (!arrays) if (!arrays)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment