tree-wide: get rid of strappend()
It's a special case of strjoin(), so no need to keep both. In particular as typing strjoin() is even shoert than strappend().
This commit is contained in:
committed by
Yu Watanabe
parent
6fa0524133
commit
b910cc72c0
+5
-5
@@ -1700,7 +1700,7 @@ static int build_environment(
|
||||
}
|
||||
|
||||
if (home) {
|
||||
x = strappend("HOME=", home);
|
||||
x = strjoin("HOME=", home);
|
||||
if (!x)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1709,19 +1709,19 @@ static int build_environment(
|
||||
}
|
||||
|
||||
if (username) {
|
||||
x = strappend("LOGNAME=", username);
|
||||
x = strjoin("LOGNAME=", username);
|
||||
if (!x)
|
||||
return -ENOMEM;
|
||||
our_env[n_env++] = x;
|
||||
|
||||
x = strappend("USER=", username);
|
||||
x = strjoin("USER=", username);
|
||||
if (!x)
|
||||
return -ENOMEM;
|
||||
our_env[n_env++] = x;
|
||||
}
|
||||
|
||||
if (shell) {
|
||||
x = strappend("SHELL=", shell);
|
||||
x = strjoin("SHELL=", shell);
|
||||
if (!x)
|
||||
return -ENOMEM;
|
||||
|
||||
@@ -1750,7 +1750,7 @@ static int build_environment(
|
||||
if (!term)
|
||||
term = default_term_for_tty(tty_path);
|
||||
|
||||
x = strappend("TERM=", term);
|
||||
x = strjoin("TERM=", term);
|
||||
if (!x)
|
||||
return -ENOMEM;
|
||||
our_env[n_env++] = x;
|
||||
|
||||
Reference in New Issue
Block a user