Commit 96251a75e0097639a6df558e4e62f762100f03d3
Committed by
Linus Torvalds
1 parent
64427985c7
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>
Showing 1 changed file with 3 additions and 4 deletions Side-by-side Diff
lib/cmdline.c
... | ... | @@ -228,7 +228,6 @@ |
228 | 228 | { |
229 | 229 | unsigned int i, equals = 0; |
230 | 230 | int in_quote = 0, quoted = 0; |
231 | - char *next; | |
232 | 231 | |
233 | 232 | if (*args == '"') { |
234 | 233 | args++; |
235 | 234 | |
236 | 235 | |
... | ... | @@ -266,11 +265,11 @@ |
266 | 265 | |
267 | 266 | if (args[i]) { |
268 | 267 | args[i] = '\0'; |
269 | - next = args + i + 1; | |
268 | + args += i + 1; | |
270 | 269 | } else |
271 | - next = args + i; | |
270 | + args += i; | |
272 | 271 | |
273 | 272 | /* Chew up trailing spaces. */ |
274 | - return skip_spaces(next); | |
273 | + return skip_spaces(args); | |
275 | 274 | } |