Skip to content

Commit 3595139

Browse files
GustavoARSilvadavem330
authored andcommitted
pktgen: Remove VLA usage
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>
1 parent ff3c1b1 commit 3595139

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/core/pktgen.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -907,7 +907,7 @@ static ssize_t pktgen_if_write(struct file *file,
907907

908908
if (debug) {
909909
size_t copy = min_t(size_t, count, 1023);
910-
char tb[copy + 1];
910+
char tb[1024];
911911
if (copy_from_user(tb, user_buffer, copy))
912912
return -EFAULT;
913913
tb[copy] = 0;

0 commit comments

Comments
 (0)