From: Rui Salvaterra Date: Sun, 13 Dec 2020 11:57:43 +0000 (+0000) Subject: utils: simplify mkdir_p boolean conditions X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5bc0146a1d6474d339c4ade9a227f32cc27a8b93;p=project%2Flibubox.git utils: simplify mkdir_p boolean conditions Just a trivial simplification. Signed-off-by: Rui Salvaterra --- diff --git a/utils.c b/utils.c index db63238..82af887 100644 --- a/utils.c +++ b/utils.c @@ -164,7 +164,7 @@ int mkdir_p(char *dir, mode_t mask) int ret; ret = mkdir(dir, mask); - if (!ret || (ret && errno == EEXIST)) + if (!ret || errno == EEXIST) return 0; if (ret && (errno != ENOENT)) @@ -182,7 +182,7 @@ int mkdir_p(char *dir, mode_t mask) *l = '/'; ret = mkdir(dir, mask); - if (!ret || (ret && errno == EEXIST)) + if (!ret || errno == EEXIST) return 0; else return -1;