aboutsummaryrefslogtreecommitdiffstats
path: root/tests/readdir_inode.c
diff options
context:
space:
mode:
authorMartin Pärtel <martin.partel@gmail.com>2017-03-14 00:09:20 +0000
committerMartin Pärtel <martin.partel@gmail.com>2017-03-14 00:09:20 +0000
commitef44d5b2b3ba4ff4f1c8d60f125f521be9cd0e78 (patch)
tree90c931c596a10004ff578cf57dd192c98353f193 /tests/readdir_inode.c
parent3f10f219d18e42967c67349f6e5f4340769e524d (diff)
downloadbindfs-ef44d5b2b3ba4ff4f1c8d60f125f521be9cd0e78.tar.gz
Run tests on FreeBSD 10.3 and fix tests so they pass.
Fully fixes issue #51.
Diffstat (limited to 'tests/readdir_inode.c')
-rw-r--r--tests/readdir_inode.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/readdir_inode.c b/tests/readdir_inode.c
index ed413be..532d2e2 100644
--- a/tests/readdir_inode.c
+++ b/tests/readdir_inode.c
@@ -20,15 +20,16 @@ int main(int argc, char* argv[])
return 2;
}
+ errno = 0;
dent = readdir(dirp);
while (dent != NULL) {
- if (errno != 0) {
- perror("failed to read directory entry");
- return 3;
- }
printf("%llu %s\n", (unsigned long long)dent->d_ino, dent->d_name);
dent = readdir(dirp);
}
+ if (errno != 0) {
+ perror("failed to read directory entry");
+ return 3;
+ }
closedir(dirp);