diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2022-02-10 11:14:23 +0900 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2022-04-04 08:14:41 -0700 |
commit | d890179b451211c506b7860f125a6ae181c9f5dc (patch) | |
tree | d9187b8ee431882e2a4db82e5c8ffef7d0a5ded5 | |
parent | 757b3599236c0fee9e2bb0770eb6b7c84a271276 (diff) | |
download | kmod-d890179b451211c506b7860f125a6ae181c9f5dc.tar.gz kmod-d890179b451211c506b7860f125a6ae181c9f5dc.tar.bz2 kmod-d890179b451211c506b7860f125a6ae181c9f5dc.zip |
modprobe: remove unneeded variable str_start
The variable 'str_start' is not useful here.
Replace it with 'str'.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
-rw-r--r-- | tools/modprobe.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/modprobe.c b/tools/modprobe.c index 48b1c8c..ca372b8 100644 --- a/tools/modprobe.c +++ b/tools/modprobe.c @@ -684,7 +684,7 @@ static int options_from_array(char **args, int nargs, char **output) static char **prepend_options_from_env(int *p_argc, char **orig_argv) { const char *p, *env = getenv("MODPROBE_OPTIONS"); - char **new_argv, *str_start, *str_end, *str, *s, *quote; + char **new_argv, *str_end, *str, *s, *quote; int i, argc = *p_argc; size_t envlen, space_count = 0; @@ -702,10 +702,10 @@ static char **prepend_options_from_env(int *p_argc, char **orig_argv) return NULL; new_argv[0] = orig_argv[0]; - str_start = str = (char *) (new_argv + argc + space_count + 3); + str = (char *) (new_argv + argc + space_count + 3); memcpy(str, env, envlen + 1); - str_end = str_start + envlen; + str_end = str + envlen; quote = NULL; for (i = 1, s = str; *s != '\0'; s++) { |