summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-10 07:19:34 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-10-10 07:19:34 +0000
commitabd9e9beece2f664495a8ef86602033f760f5a07 (patch)
treeaba4bf4f978acbc370ea63f60694ddf8becd1841 /test
parent6ef0e347c81effc0b099ac7271a9370974c535cf (diff)
- Include stdio.h for the perror prototype, use constants from stdlib.h,
tidy up old-style function definition.
Diffstat (limited to 'test')
-rw-r--r--test/misc/tst-scandir.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/misc/tst-scandir.c b/test/misc/tst-scandir.c
index 4d525ae6c..df62a40d4 100644
--- a/test/misc/tst-scandir.c
+++ b/test/misc/tst-scandir.c
@@ -1,5 +1,7 @@
#include <dirent.h>
#include <errno.h>
+#include <stdio.h> /* perror() */
+#include <stdlib.h>
int skip_all(const struct dirent *dirbuf)
{
@@ -7,7 +9,7 @@ int skip_all(const struct dirent *dirbuf)
return 0;
}
-int main()
+int main(void)
{
struct dirent **namelist;
int n;
@@ -15,7 +17,7 @@ int main()
n = scandir(".", &namelist, skip_all, 0);
if (n < 0) {
perror("scandir");
- return 1;
+ return EXIT_FAILURE;
}
- return 0;
+ return EXIT_SUCCESS;
}