diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/fs-tests/integrity/integck.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/fs-tests/integrity/integck.c b/tests/fs-tests/integrity/integck.c index 310e228..9cb0403 100644 --- a/tests/fs-tests/integrity/integck.c +++ b/tests/fs-tests/integrity/integck.c @@ -455,6 +455,8 @@ static int dir_new(struct dir_info *parent, const char *name) struct dir_info *dir; char *path; + assert(parent); + path = dir_path(parent, name); if (mkdir(path, 0777) != 0) { if (errno == ENOSPC) { @@ -469,8 +471,7 @@ static int dir_new(struct dir_info *parent, const char *name) free(path); dir = zalloc(sizeof(struct dir_info)); - if (parent) - add_dir_entry(parent, 'd', name, dir); + add_dir_entry(parent, 'd', name, dir); return 0; } |