From ef44d5b2b3ba4ff4f1c8d60f125f521be9cd0e78 Mon Sep 17 00:00:00 2001 From: Martin Pärtel Date: Tue, 14 Mar 2017 00:09:20 +0000 Subject: Run tests on FreeBSD 10.3 and fix tests so they pass. Fully fixes issue #51. --- tests/readdir_inode.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/readdir_inode.c') 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); -- cgit v1.2.3