Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Masahiro Yamada and committed by
Linus Torvalds
96251a75 64427985

+3 -4
+3 -4
lib/cmdline.c
··· 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++; ··· 265 266 266 267 if (args[i]) { 267 268 args[i] = '\0'; 268 - next = args + i + 1; 269 + args += i + 1; 269 270 } else 270 - next = args + i; 271 + args += i; 271 272 272 273 /* Chew up trailing spaces. */ 273 - return skip_spaces(next); 274 + return skip_spaces(args); 274 275 }