Skip to content

Commit

Permalink
net: pktgen: remove some superfluous variable initializing
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Seiderer authored and Paolo Abeni committed Mar 4, 2025
1 parent 7d39e01 commit 80f6c19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 80f6c19

Please sign in to comment.