svn commit: trunk/uClibc/test/misc
aldot at uclibc.org
aldot at uclibc.org
Fri Oct 10 07:19:34 UTC 2008
Author: aldot
Date: 2008-10-10 00:19:34 -0700 (Fri, 10 Oct 2008)
New Revision: 23646
Log:
- Include stdio.h for the perror prototype, use constants from stdlib.h,
tidy up old-style function definition.
Modified:
trunk/uClibc/test/misc/tst-scandir.c
Changeset:
Modified: trunk/uClibc/test/misc/tst-scandir.c
===================================================================
--- trunk/uClibc/test/misc/tst-scandir.c 2008-10-09 18:36:36 UTC (rev 23645)
+++ trunk/uClibc/test/misc/tst-scandir.c 2008-10-10 07:19:34 UTC (rev 23646)
@@ -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 @@
return 0;
}
-int main()
+int main(void)
{
struct dirent **namelist;
int n;
@@ -15,7 +17,7 @@
n = scandir(".", &namelist, skip_all, 0);
if (n < 0) {
perror("scandir");
- return 1;
+ return EXIT_FAILURE;
}
- return 0;
+ return EXIT_SUCCESS;
}
More information about the uClibc-cvs
mailing list