aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorPeter Seiderer <ps.report@gmx.net>2025-02-27 14:55:59 +0100
committerPaolo Abeni <pabeni@redhat.com>2025-03-04 10:57:57 +0100
commit80f6c198dfd5fd7e59b39cb6be292528b6fcaaca (patch)
treef9cf2036cb7e1f1c0064a5d0c5f4cc1d045d4c5c
parentnet: pktgen: remove extra tmp variable (re-use len instead) (diff)
downloadwireguard-linux-80f6c198dfd5fd7e59b39cb6be292528b6fcaaca.tar.xz
wireguard-linux-80f6c198dfd5fd7e59b39cb6be292528b6fcaaca.zip
net: pktgen: remove some superfluous variable initializing
Remove some superfluous variable initializing before hex32_arg call (as the same init is done here already). Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
-rw-r--r--net/core/pktgen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 9a5fc1298bd3..b678b28dedae 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1785,7 +1785,7 @@ static ssize_t pktgen_if_write(struct file *file,
}
if (!strcmp(name, "tos")) {
- __u32 tmp_value = 0;
+ __u32 tmp_value;
len = hex32_arg(&user_buffer[i], 2, &tmp_value);
if (len < 0)
return len;
@@ -1801,7 +1801,7 @@ static ssize_t pktgen_if_write(struct file *file,
}
if (!strcmp(name, "traffic_class")) {
- __u32 tmp_value = 0;
+ __u32 tmp_value;
len = hex32_arg(&user_buffer[i], 2, &tmp_value);
if (len < 0)
return len;