]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: pktgen: remove some superfluous variable initializing
authorPeter Seiderer <ps.report@gmx.net>
Thu, 27 Feb 2025 13:55:59 +0000 (14:55 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 4 Mar 2025 09:57:57 +0000 (10:57 +0100)
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>
net/core/pktgen.c

index 9a5fc1298bd33f18cf3b47054328ad635cd4771c..b678b28dedae3aa3464780ab2deb21a2be54c9eb 100644 (file)
@@ -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;