diff options
author | Lennart Poettering <lennart@poettering.net> | 2018-11-23 16:51:53 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-11-26 14:08:46 +0100 |
commit | da9fc98ded5b0931782c0422752f2daf7fe4557c (patch) | |
tree | 7fdc96e0591025b286d67818d22b8fcf90103460 /src/nspawn | |
parent | path-util: beef up PATH_STARTSWITH_SET() macro a bit (diff) | |
download | systemd-da9fc98ded5b0931782c0422752f2daf7fe4557c.tar.xz systemd-da9fc98ded5b0931782c0422752f2daf7fe4557c.zip |
tree-wide: port more code over to PATH_STARTSWITH_SET()
Diffstat (limited to 'src/nspawn')
-rw-r--r-- | src/nspawn/nspawn.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 47fe7d4865..c581514b29 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1427,17 +1427,10 @@ static int userns_mkdir(const char *root, const char *path, mode_t mode, uid_t u } static const char *timezone_from_path(const char *path) { - const char *z; - - z = path_startswith(path, "../usr/share/zoneinfo/"); - if (z) - return z; - - z = path_startswith(path, "/usr/share/zoneinfo/"); - if (z) - return z; - - return NULL; + return PATH_STARTSWITH_SET( + path, + "../usr/share/zoneinfo/", + "/usr/share/zoneinfo/"); } static int setup_timezone(const char *dest) { |