diff options
Diffstat (limited to 'src/journal')
-rw-r--r-- | src/journal/journalctl.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c index 5a59a3ac83..78495f8c9d 100644 --- a/src/journal/journalctl.c +++ b/src/journal/journalctl.c @@ -1614,16 +1614,12 @@ int main(int argc, char *argv[]) { arg_action == ACTION_LIST_CATALOG || arg_action == ACTION_DUMP_CATALOG) { - const char* database = CATALOG_DATABASE; - _cleanup_free_ char *copy = NULL; - if (arg_root) { - copy = strjoin(arg_root, "/", CATALOG_DATABASE, NULL); - if (!copy) { - r = log_oom(); - goto finish; - } - path_kill_slashes(copy); - database = copy; + _cleanup_free_ char *database; + + database = path_join(arg_root, CATALOG_DATABASE, NULL); + if (!database) { + r = log_oom(); + goto finish; } if (arg_action == ACTION_UPDATE_CATALOG) { |