harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r521155 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Date Thu, 22 Mar 2007 09:02:26 GMT
Author: pyang
Date: Thu Mar 22 02:02:25 2007
New Revision: 521155

URL: http://svn.apache.org/viewvc?view=rev&rev=521155
Log:
Apply patch for HARMONY-3334([classlib][luni-native] Native Method XXX_transferImpl in luni/src/main/native/luni/unix/OSFileSystemLinux32.c
did not handle endian properly)

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c?view=diff&rev=521155&r1=521154&r2=521155
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSFileSystemLinux32.c
Thu Mar 22 02:02:25 2007
@@ -245,9 +245,13 @@
   if(hysocketP == NULL)
     return -1;
   socket = hysocketP->sock;
+  /* Value of offset is checked in jint scope (checked in java layer)
+   The conversion here is to guarantee no value lost when converting offset to off_t
+   */
+  off_t off = offset;
 #if !defined(FREEBSD)
-  return sendfile(socket,(int)fd,(off_t *)&offset,(size_t)count);	
+  return sendfile(socket,(int)fd,(off_t *)&off,(size_t)count);	
 #else
-  return sendfile(fd, socket, offset, (size_t)count, NULL, NULL, 0);
+  return sendfile(fd, socket, off, (size_t)count, NULL, NULL, 0);
 #endif
 }



Mime
View raw message