diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-23 17:19:24 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-26 18:24:12 +0100 |
commit | ccfc08d4bcac9f3108cbfaeef8b9fad855d5961c (patch) | |
tree | 3967eb8905aad4fe553ff2099f993e7b66d81ac2 /src/core/show-status.c | |
parent | show-status: fold two bool flags function arguments into a flags (diff) | |
download | systemd-ccfc08d4bcac9f3108cbfaeef8b9fad855d5961c.tar.xz systemd-ccfc08d4bcac9f3108cbfaeef8b9fad855d5961c.zip |
show-status: use free_and_replace() where we can
Diffstat (limited to 'src/core/show-status.c')
-rw-r--r-- | src/core/show-status.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/show-status.c b/src/core/show-status.c index e8ac004903..f748a82084 100644 --- a/src/core/show-status.c +++ b/src/core/show-status.c @@ -73,10 +73,8 @@ int status_vprintf(const char *status, ShowStatusFlags flags, const char *format emax = 3; e = ellipsize(s, emax, 50); - if (e) { - free(s); - s = e; - } + if (e) + free_and_replace(s, e); } if (prev_ephemeral) |