--- a/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c	2010-09-22 22:31:24.000000000 +0900
+++ b/testcases/open_posix_testsuite/conformance/interfaces/aio_error/3-1.c	2010-09-30 09:51:42.000000000 +0900
@@ -36,42 +36,41 @@
 
 int main()
 {
-
-        char tmpfname[256];
+	char tmpfname[256];
 #define BUF_SIZE 512
-        char buf[BUF_SIZE];
-        int fd;
-        struct aiocb aiocb;
+	char buf[BUF_SIZE];
+	int fd;
+	struct aiocb aiocb;
 	int ret=0;
 
 	if (sysconf(_SC_ASYNCHRONOUS_IO) != 200112L)
 		return PTS_UNSUPPORTED;
 
-        snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_error_3_1_%d",
-                  getpid());
-        unlink(tmpfname);
-        fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
-                  S_IRUSR | S_IWUSR);
-        if (fd == -1)
-        {
-                printf(TNAME " Error at open(): %s\n",
-                       strerror(errno));
-                exit(PTS_UNRESOLVED);
-        }
+	snprintf(tmpfname, sizeof(tmpfname), "/tmp/pts_aio_error_3_1_%d",
+			 getpid());
+	unlink(tmpfname);
+	fd = open(tmpfname, O_CREAT | O_RDWR | O_EXCL,
+			  S_IRUSR | S_IWUSR);
+	if (fd == -1)
+	{
+		printf(TNAME " Error at open(): %s\n",
+			   strerror(errno));
+		exit(PTS_UNRESOLVED);
+	}
 
-        unlink(tmpfname);
+	unlink(tmpfname);
 
 	memset (&aiocb, 0, sizeof (struct aiocb));
 
-        aiocb.aio_fildes = fd;
-        aiocb.aio_buf = buf;
-        aiocb.aio_reqprio = -1;
-        aiocb.aio_nbytes = BUF_SIZE;
+	aiocb.aio_fildes = fd;
+	aiocb.aio_buf = buf;
+	aiocb.aio_reqprio = -1;
+	aiocb.aio_nbytes = BUF_SIZE;
 
-        if (aio_write(&aiocb) != 0)
+	if (aio_write(&aiocb) == 0)
 	{
-                printf(TNAME " bad aio_read return value()\n");
-                exit(PTS_FAIL);
+		printf(TNAME " bad aio_write return value()\n");
+		exit(PTS_FAIL);
 	}
 
 	while (aio_error (&aiocb) == EINPROGRESS);
