utils: simplify mkdir_p boolean conditions

Just a trivial simplification.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
This commit is contained in:
Rui Salvaterra 2020-12-13 11:57:43 +00:00 committed by Daniel Golle
parent 357877693c
commit 5bc0146a1d

View file

@ -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;