Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 35951393 authored by Gustavo A. R. Silva's avatar Gustavo A. R. Silva Committed by David S. Miller
Browse files

pktgen: Remove VLA usage



In preparation to enabling -Wvla, remove VLA usage and replace it
with a fixed-length array instead.

Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ff3c1b1a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;