Browse Source

utils: simplify mkdir_p boolean conditions

Just a trivial simplification.

Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
master
Rui Salvaterra 5 months ago
committed by Daniel Golle
parent
commit
5bc0146a1d
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      utils.c

+ 2
- 2
utils.c 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;


Loading…
Cancel
Save