tree-wide: get rid of strappend()
It's a special case of strjoin(), so no need to keep both. In particular as typing strjoin() is even shoert than strappend().
This commit is contained in:
committed by
Yu Watanabe
parent
6fa0524133
commit
b910cc72c0
@@ -458,7 +458,7 @@ char *image_bus_path(const char *name) {
|
||||
if (!e)
|
||||
return NULL;
|
||||
|
||||
return strappend("/org/freedesktop/machine1/image/", e);
|
||||
return strjoin("/org/freedesktop/machine1/image/", e);
|
||||
}
|
||||
|
||||
int image_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error) {
|
||||
|
||||
@@ -1383,7 +1383,7 @@ char *machine_bus_path(Machine *m) {
|
||||
if (!e)
|
||||
return NULL;
|
||||
|
||||
return strappend("/org/freedesktop/machine1/machine/", e);
|
||||
return strjoin("/org/freedesktop/machine1/machine/", e);
|
||||
}
|
||||
|
||||
int machine_node_enumerator(sd_bus *bus, const char *path, void *userdata, char ***nodes, sd_bus_error *error) {
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "machine.h"
|
||||
#include "mkdir.h"
|
||||
#include "parse-util.h"
|
||||
#include "path-util.h"
|
||||
#include "process-util.h"
|
||||
#include "serialize.h"
|
||||
#include "special.h"
|
||||
@@ -53,7 +54,7 @@ Machine* machine_new(Manager *manager, MachineClass class, const char *name) {
|
||||
goto fail;
|
||||
|
||||
if (class != MACHINE_HOST) {
|
||||
m->state_file = strappend("/run/systemd/machines/", m->name);
|
||||
m->state_file = path_join("/run/systemd/machines", m->name);
|
||||
if (!m->state_file)
|
||||
goto fail;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user