projects
/
project
/
libubox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3578776
)
utils: simplify mkdir_p boolean conditions
author
Rui Salvaterra
<rsalvaterra@gmail.com>
Sun, 13 Dec 2020 11:57:43 +0000
(11:57 +0000)
committer
Daniel Golle
<daniel@makrotopia.org>
Sun, 13 Dec 2020 12:05:45 +0000
(12:05 +0000)
Just a trivial simplification.
Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
utils.c
patch
|
blob
|
history
diff --git
a/utils.c
b/utils.c
index db632380f908e9da104758de25eed9374694ed72..82af887cfa9ceed552371fce9b71e21b55a93797 100644
(file)
--- 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;