diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-16 23:08:23 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-16 23:08:23 -0400 |
commit | 24737c291738313fd67924172988a8986f60e958 (patch) | |
tree | 47ae0c571e452ffda40ee041105dfd44ce255e7f /src/shared | |
parent | 3ae5990c6ed54f5d4acec12c2e9e40d110c72230 (diff) |
install: allow paths like LookupPath.generator to be NULL
Fixes #3047.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/install.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/shared/install.c b/src/shared/install.c index 74de8141f1..10c724edbd 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -119,9 +119,9 @@ static int path_is_generator(const LookupPaths *p, const char *path) { if (!parent) return -ENOMEM; - return path_equal(p->generator, parent) || - path_equal(p->generator_early, parent) || - path_equal(p->generator_late, parent); + return path_equal_ptr(parent, p->generator) || + path_equal_ptr(parent, p->generator_early) || + path_equal_ptr(parent, p->generator_late); } static int path_is_transient(const LookupPaths *p, const char *path) { @@ -134,7 +134,7 @@ static int path_is_transient(const LookupPaths *p, const char *path) { if (!parent) return -ENOMEM; - return path_equal(p->transient, parent); + return path_equal_ptr(parent, p->transient); } static int path_is_control(const LookupPaths *p, const char *path) { @@ -147,8 +147,8 @@ static int path_is_control(const LookupPaths *p, const char *path) { if (!parent) return -ENOMEM; - return path_equal(parent, p->persistent_control) || - path_equal(parent, p->runtime_control); + return path_equal_ptr(parent, p->persistent_control) || + path_equal_ptr(parent, p->runtime_control); } static int path_is_config(const LookupPaths *p, const char *path) { @@ -164,8 +164,8 @@ static int path_is_config(const LookupPaths *p, const char *path) { if (!parent) return -ENOMEM; - return path_equal(parent, p->persistent_config) || - path_equal(parent, p->runtime_config); + return path_equal_ptr(parent, p->persistent_config) || + path_equal_ptr(parent, p->runtime_config); } static int path_is_runtime(const LookupPaths *p, const char *path) { @@ -186,12 +186,12 @@ static int path_is_runtime(const LookupPaths *p, const char *path) { if (!parent) return -ENOMEM; - return path_equal(parent, p->runtime_config) || - path_equal(parent, p->generator) || - path_equal(parent, p->generator_early) || - path_equal(parent, p->generator_late) || - path_equal(parent, p->transient) || - path_equal(parent, p->runtime_control); + return path_equal_ptr(parent, p->runtime_config) || + path_equal_ptr(parent, p->generator) || + path_equal_ptr(parent, p->generator_early) || + path_equal_ptr(parent, p->generator_late) || + path_equal_ptr(parent, p->transient) || + path_equal_ptr(parent, p->runtime_control); } static int path_is_vendor(const LookupPaths *p, const char *path) { |