[kaffe] CVS kaffe (dalibor): Fix for parameter order of KLSEEK

Kaffe CVS cvs-commits at kaffe.org
Fri Mar 5 12:16:01 PST 2004


PatchSet 4480 
Date: 2004/03/05 20:01:11
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fix for parameter order of KLSEEK

Members: 
	ChangeLog:1.2060->1.2061 
	libraries/clib/io/FileDescriptor.c:1.9->1.10 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2060 kaffe/ChangeLog:1.2061
--- kaffe/ChangeLog:1.2060	Fri Mar  5 17:12:34 2004
+++ kaffe/ChangeLog	Fri Mar  5 20:01:11 2004
@@ -1,4 +1,11 @@
+2004-03-05  Cliff Wright <cliffw at messagegate.com>
+
+	* libraries/clib/io/FileDescriptor.c:
+	Fixed parameter order to KLSEEK and added a missing
+	return check.
+
 2004-03-05  Jim Huang <jimchyun at ccns.ncku.edu.tw>
+
 	* libraries/clib/awt/X/tlk.c
 	* libraries/clib/awt/X/toolkit.h:
 	Support XOM (X Output Method) for i18n context drawing.
Index: kaffe/libraries/clib/io/FileDescriptor.c
diff -u kaffe/libraries/clib/io/FileDescriptor.c:1.9 kaffe/libraries/clib/io/FileDescriptor.c:1.10
--- kaffe/libraries/clib/io/FileDescriptor.c:1.9	Mon Nov  3 05:29:33 2003
+++ kaffe/libraries/clib/io/FileDescriptor.c	Fri Mar  5 20:01:13 2004
@@ -404,14 +404,14 @@
     ssize_t ret;
 
     /* Save the old file position */
-    rc = KLSEEK(nativeFd, SEEK_CUR, 0, &oldPosition);
+    rc = KLSEEK(nativeFd, 0, SEEK_CUR, &oldPosition);
     if (rc != 0)
     {
       SignalError("java.io.IOException", SYS_ERROR(rc));
     }
 
     /* Go to new_length-1 */
-    rc = KLSEEK(nativeFd, SEEK_SET, new_length-1, &cur);
+    rc = KLSEEK(nativeFd, new_length-1, SEEK_SET, &cur);
     if (rc != 0)
     {
       SignalError("java.io.IOException", SYS_ERROR(rc));
@@ -425,7 +425,8 @@
     }
     
     /* Go back to the old position */
-    rc = KLSEEK(nativeFd, SEEK_SET, oldPosition, &cur);
+    rc = KLSEEK(nativeFd, oldPosition, SEEK_SET, &cur);
+    if (rc != 0)
     {
       SignalError("java.io.IOException", SYS_ERROR(rc));
     }




More information about the kaffe mailing list