diff options
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journald-server.c | 4 | ||||
-rw-r--r-- | src/journal/sd-journal.c | 5 |
2 files changed, 3 insertions, 6 deletions
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c index 2a4fc250c9..50ccc80e87 100644 --- a/src/journal/journald-server.c +++ b/src/journal/journald-server.c @@ -2192,8 +2192,8 @@ int server_init(Server *s) { server_cache_boot_id(s); server_cache_machine_id(s); - s->runtime_storage.path = strjoin("/run/log/journal/", SERVER_MACHINE_ID(s)); - s->system_storage.path = strjoin("/var/log/journal/", SERVER_MACHINE_ID(s)); + s->runtime_storage.path = path_join("/run/log/journal", SERVER_MACHINE_ID(s)); + s->system_storage.path = path_join("/var/log/journal", SERVER_MACHINE_ID(s)); if (!s->runtime_storage.path || !s->system_storage.path) return -ENOMEM; diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c index 40baf2b374..a4f1731613 100644 --- a/src/journal/sd-journal.c +++ b/src/journal/sd-journal.c @@ -1553,10 +1553,7 @@ static int add_directory(sd_journal *j, const char *prefix, const char *dirname) /* Adds a journal file directory to watch. If the directory is already tracked this updates the inotify watch * and reenumerates directory contents */ - if (dirname) - path = strjoin(prefix, "/", dirname); - else - path = strdup(prefix); + path = path_join(prefix, dirname); if (!path) { r = -ENOMEM; goto fail; |