/* SPDX-License-Identifier: LGPL-2.1+ */
-/***
- This file is part of systemd.
-
- Copyright 2010-2012 Lennart Poettering
-***/
#include <errno.h>
#include <limits.h>
if (r < 0)
return r;
- if (endswith(cwd, "/"))
- c = strjoin(cwd, p);
- else
- c = strjoin(cwd, "/", p);
+ c = path_join(NULL, cwd, p);
}
if (!c)
return -ENOMEM;