mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-06 09:04:22 -04:00
net: pktgen: remove extra tmp variable (re-use len instead)
Remove extra tmp variable in pktgen_if_write (re-use len instead). Signed-off-by: Peter Seiderer <ps.report@gmx.net> Reviewed-by: Simon Horman <horms@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
90b856ae35
commit
7d39e01803
@@ -959,7 +959,6 @@ static ssize_t pktgen_if_write(struct file *file,
|
||||
char name[16], valstr[32];
|
||||
unsigned long value = 0;
|
||||
char *pg_result = NULL;
|
||||
int tmp = 0;
|
||||
char buf[128];
|
||||
|
||||
pg_result = &(pkt_dev->result[0]);
|
||||
@@ -970,12 +969,12 @@ static ssize_t pktgen_if_write(struct file *file,
|
||||
}
|
||||
|
||||
max = count;
|
||||
tmp = count_trail_chars(user_buffer, max);
|
||||
if (tmp < 0) {
|
||||
len = count_trail_chars(user_buffer, max);
|
||||
if (len < 0) {
|
||||
pr_warn("illegal format\n");
|
||||
return tmp;
|
||||
return len;
|
||||
}
|
||||
i = tmp;
|
||||
i = len;
|
||||
|
||||
/* Read variable name */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user