aboutsummaryrefslogtreecommitdiff
path: root/tests/fs-tests/lib
diff options
context:
space:
mode:
authorAndy Shevchenko <ext-andriy.shevchenko@nokia.com>2011-04-05 16:55:52 +0300
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2011-04-05 17:22:41 +0300
commitf4e4f8b03353b049ca176642da138d22ea17f43f (patch)
treedcf65e7d6e2df6b458f862981c2828b141f10e1d /tests/fs-tests/lib
parent4c2c6f48b15b69a013beb1faecb6b080d03baf16 (diff)
tests: fs-tests: check return value of functions
chdir() returns negative value in case of error. fscanf() returns amount of successfully parsed parameters. Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'tests/fs-tests/lib')
-rw-r--r--tests/fs-tests/lib/tests.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/fs-tests/lib/tests.c b/tests/fs-tests/lib/tests.c
index 00b94f9..8a6a5f5 100644
--- a/tests/fs-tests/lib/tests.c
+++ b/tests/fs-tests/lib/tests.c
@@ -1236,7 +1236,8 @@ void tests_try_to_clear_dir(const char *dir_name)
break;
}
}
- chdir(buf);
+ if (chdir(buf) < 0)
+ perror("chdir");
closedir(dir);
}