projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6442798
)
lib/cmdline: remove an unneeded local variable in next_arg()
author
Masahiro Yamada
<masahiroy@kernel.org>
Fri, 26 Feb 2021 01:21:34 +0000
(17:21 -0800)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Fri, 26 Feb 2021 17:41:04 +0000
(09:41 -0800)
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>
lib/cmdline.c
patch
|
blob
|
history
diff --git
a/lib/cmdline.c
b/lib/cmdline.c
index dfd4c4423f9a27137adbb9833bb38813b295de54..5d474c626e245c17a8ebc1d6530311e5fa5acf5e 100644
(file)
--- 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
);
}