diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2017-03-14 00:09:20 +0000 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2017-03-14 00:09:20 +0000 |
commit | ef44d5b2b3ba4ff4f1c8d60f125f521be9cd0e78 (patch) | |
tree | 90c931c596a10004ff578cf57dd192c98353f193 /tests/readdir_inode.c | |
parent | 3f10f219d18e42967c67349f6e5f4340769e524d (diff) | |
download | bindfs-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.c | 9 |
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); |