basic: drop unnecessary strempty() call in replace_env

strempty() converts a NULL value to empty string, so
that it can be passed on to functions that don't support NULL.

replace_env calls strempty before passing its value on to strappend.

strappend supports NULL just fine, though, so this commit drops the
strempty call.
This commit is contained in:
Ray Strode
2017-02-20 18:49:14 -05:00
committed by Zbigniew Jędrzejewski-Szmek
parent 6162512cde
commit d8ad241f54
+1 -1
View File
@@ -563,7 +563,7 @@ char *replace_env(const char *format, char **env) {
if (*e == '}') {
const char *t;
t = strempty(strv_env_get_n(env, word+2, e-word-2));
t = strv_env_get_n(env, word+2, e-word-2);
k = strappend(r, t);
if (!k)