Update of /cvsroot/libsysio/libsysio/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv2952
Modified Files:
Tag: RedStorm
test_unlink.c
Log Message:
-Don't need dirent.h
-Check return from unlink appropriately
Index: test_unlink.c
===================================================================
RCS file: /cvsroot/libsysio/libsysio/tests/Attic/test_unlink.c,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -u -w -b -B -p -r1.1.2.1 -r1.1.2.2
--- test_unlink.c 19 Jun 2003 17:48:14 -0000 1.1.2.1
+++ test_unlink.c 29 Jul 2003 18:33:01 -0000 1.1.2.2
@@ -50,8 +50,9 @@
#include <unistd.h>
#endif
#include <errno.h>
-#if 0
+#include <sys/types.h>
#include <sys/queue.h>
+#if 0
#include <dirent.h>
#endif
@@ -180,7 +181,7 @@ static int
unlinkit(const char *path)
{
- if (!unlink(path)) {
+ if (unlink(path) != 0) {
perror(path);
return -1;
}
|