summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2016-08-09 10:39:15 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-02-20 18:49:14 -0500
commitd8ad241f54b8c4ac76aafd960d89b47b0ed87fb6 (patch)
tree75a8aa7c0d49b11547a6294e43f8fe79dcc1fab7 /src/basic
parent6162512cde54244127da547917d0e6d5d0a378c3 (diff)
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.
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/env-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index f9208d1475..86ac07e1b6 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -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)