aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-20 12:54:12 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-22 14:29:53 +0300
commitea6c2312de38b85678932a90e5ffd335f60de3eb (patch)
tree2d484d8ec4f0f4e7e22e55aa3afd4cc2635a9b95 /tests
parent1394a46213e8180e1233ca6d4811e7c77d49b1e0 (diff)
fs-tests: integck: assume that the parent is present in new_dir
We always pass non-NULL 'parent' argument to 'new_dir()', so no need to test it for NULL. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/fs-tests/integrity/integck.c5
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;
}