summaryrefslogtreecommitdiffstats
path: root/src/core/generator-setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/generator-setup.c')
-rw-r--r--src/core/generator-setup.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/core/generator-setup.c b/src/core/generator-setup.c
index 00d6ad6..b16211e 100644
--- a/src/core/generator-setup.c
+++ b/src/core/generator-setup.c
@@ -8,7 +8,7 @@
#include "rm-rf.h"
int lookup_paths_mkdir_generator(LookupPaths *p) {
- int r, q;
+ int r;
assert(p);
@@ -16,14 +16,8 @@ int lookup_paths_mkdir_generator(LookupPaths *p) {
return -EINVAL;
r = mkdir_p_label(p->generator, 0755);
-
- q = mkdir_p_label(p->generator_early, 0755);
- if (q < 0 && r >= 0)
- r = q;
-
- q = mkdir_p_label(p->generator_late, 0755);
- if (q < 0 && r >= 0)
- r = q;
+ RET_GATHER(r, mkdir_p_label(p->generator_early, 0755));
+ RET_GATHER(r, mkdir_p_label(p->generator_late, 0755));
return r;
}