1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-08 08:58:27 +03:00

util: minor modernisations

This commit is contained in:
Lennart Poettering 2014-11-05 19:44:01 +01:00
parent 07318c2908
commit 4a6ca457eb

View File

@ -3179,7 +3179,8 @@ char *replace_env(const char *format, char **env) {
case CURLY:
if (*e == '{') {
if (!(k = strnappend(r, word, e-word-1)))
k = strnappend(r, word, e-word-1);
if (!k)
goto fail;
free(r);
@ -3189,7 +3190,8 @@ char *replace_env(const char *format, char **env) {
state = VARIABLE;
} else if (*e == '$') {
if (!(k = strnappend(r, word, e-word)))
k = strnappend(r, word, e-word);
if (!k)
goto fail;
free(r);
@ -3221,7 +3223,8 @@ char *replace_env(const char *format, char **env) {
}
}
if (!(k = strnappend(r, word, e-word)))
k = strnappend(r, word, e-word);
if (!k)
goto fail;
free(r);