mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-23 17:34:00 +03:00
pid1: use strextend_with_separator()
This commit is contained in:
parent
2b070200f1
commit
a2a7b77260
@ -181,7 +181,7 @@ int bus_read_mount_options(
|
|||||||
return r;
|
return r;
|
||||||
|
|
||||||
while ((r = sd_bus_message_read(message, "(ss)", &partition, &mount_options)) > 0) {
|
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;
|
_cleanup_free_ MountOptions *o = NULL;
|
||||||
PartitionDesignator partition_designator;
|
PartitionDesignator partition_designator;
|
||||||
|
|
||||||
@ -198,9 +198,7 @@ int bus_read_mount_options(
|
|||||||
if (!escaped)
|
if (!escaped)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
previous = TAKE_PTR(format_str);
|
if (!strextend_with_separator(&format_str, separator, partition, ":", escaped))
|
||||||
format_str = strjoin(previous, previous ? separator : "", partition, ":", escaped);
|
|
||||||
if (!format_str)
|
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
o = new(MountOptions, 1);
|
o = new(MountOptions, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user