diff --git a/shared/util.c b/shared/util.c index 7a1f3ee..5d05c01 100644 --- a/shared/util.c +++ b/shared/util.c @@ -369,13 +369,6 @@ char *freadline_wrapped(FILE *fp, unsigned int *linenum) /* path handling functions */ /* ************************************************************************ */ -static bool path_is_absolute(const char *p) -{ - assert(p != NULL); - - return p[0] == '/'; -} - char *path_make_absolute_cwd(const char *p) { _cleanup_free_ char *cwd = NULL; diff --git a/shared/util.h b/shared/util.h index 65d90db..58431ba 100644 --- a/shared/util.h +++ b/shared/util.h @@ -45,6 +45,11 @@ _nonnull_(1) char *freadline_wrapped(FILE *fp, unsigned int *linenum); /* path handling functions */ /* ************************************************************************ */ _must_check_ _nonnull_all_ char *path_make_absolute_cwd(const char *p); +static inline _must_check_ _nonnull_all_ bool path_is_absolute(const char *p) +{ + return p[0] == '/'; +} + int mkdir_p(const char *path, int len, mode_t mode); int mkdir_parents(const char *path, mode_t mode); unsigned long long stat_mstamp(const struct stat *st);