diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2021-02-26 02:21:34 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2021-02-26 18:41:04 +0100 |
commit | 96251a75e0097639a6df558e4e62f762100f03d3 (patch) | |
tree | f3e4b48ee89c61413502ecec689127cb60991318 /lib | |
parent | lib: stackdepot: fix ignoring return value warning (diff) | |
download | linux-96251a75e0097639a6df558e4e62f762100f03d3.tar.xz linux-96251a75e0097639a6df558e4e62f762100f03d3.zip |
lib/cmdline: remove an unneeded local variable in next_arg()
The local variable 'next' is unneeded because you can simply advance the
existing pointer 'args'.
Link: https://lkml.kernel.org/r/20210201014707.3828753-1-masahiroy@kernel.org
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cmdline.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/cmdline.c b/lib/cmdline.c index dfd4c4423f9a..5d474c626e24 100644 --- a/lib/cmdline.c +++ b/lib/cmdline.c @@ -228,7 +228,6 @@ char *next_arg(char *args, char **param, char **val) { unsigned int i, equals = 0; int in_quote = 0, quoted = 0; - char *next; if (*args == '"') { args++; @@ -266,10 +265,10 @@ char *next_arg(char *args, char **param, char **val) if (args[i]) { args[i] = '\0'; - next = args + i + 1; + args += i + 1; } else - next = args + i; + args += i; /* Chew up trailing spaces. */ - return skip_spaces(next); + return skip_spaces(args); } |