summaryrefslogtreecommitdiff
path: root/src/core/dbus-util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-05-20 14:19:22 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-20 18:18:56 +0900
commita2a7b77260b4990d60bbd7797fa427d82ee52a33 (patch)
treee53aca1fdca3139d26493651ea08fd8540fe6c95 /src/core/dbus-util.c
parent2b070200f1e9b89a00e1da6abfaf15aed130a3ab (diff)
downloadsystemd-a2a7b77260b4990d60bbd7797fa427d82ee52a33.tar.gz
pid1: use strextend_with_separator()
Diffstat (limited to 'src/core/dbus-util.c')
-rw-r--r--src/core/dbus-util.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/dbus-util.c b/src/core/dbus-util.c
index 44a2ccfca0..ca9b399d8c 100644
--- a/src/core/dbus-util.c
+++ b/src/core/dbus-util.c
@@ -181,7 +181,7 @@ int bus_read_mount_options(
return r;
while ((r = sd_bus_message_read(message, "(ss)", &partition, &mount_options)) > 0) {
- _cleanup_free_ char *previous = NULL, *escaped = NULL;
+ _cleanup_free_ char *escaped = NULL;
_cleanup_free_ MountOptions *o = NULL;
PartitionDesignator partition_designator;
@@ -198,9 +198,7 @@ int bus_read_mount_options(
if (!escaped)
return -ENOMEM;
- previous = TAKE_PTR(format_str);
- format_str = strjoin(previous, previous ? separator : "", partition, ":", escaped);
- if (!format_str)
+ if (!strextend_with_separator(&format_str, separator, partition, ":", escaped))
return -ENOMEM;
o = new(MountOptions, 1);