projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ff3c1b1
)
pktgen: Remove VLA usage
author
Gustavo A. R. Silva
<gustavo@embeddedor.com>
Fri, 9 Mar 2018 05:43:40 +0000
(23:43 -0600)
committer
David S. Miller
<davem@davemloft.net>
Fri, 9 Mar 2018 16:57:17 +0000
(11:57 -0500)
In preparation to enabling -Wvla, remove VLA usage and replace it
with a fixed-length array instead.
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/pktgen.c
patch
|
blob
|
history
diff --git
a/net/core/pktgen.c
b/net/core/pktgen.c
index
d81bddd
..
e2d6ae3
100644
(file)
--- a/
net/core/pktgen.c
+++ b/
net/core/pktgen.c
@@
-907,7
+907,7
@@
static ssize_t pktgen_if_write(struct file *file,
if (debug) {
size_t copy = min_t(size_t, count, 1023);
- char tb[
copy + 1
];
+ char tb[
1024
];
if (copy_from_user(tb, user_buffer, copy))
return -EFAULT;
tb[copy] = 0;