harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r691981 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
Date Thu, 04 Sep 2008 11:52:20 GMT
Author: hindessm
Date: Thu Sep  4 04:52:20 2008
New Revision: 691981

URL: http://svn.apache.org/viewvc?rev=691981&view=rev
Log:
Remove one cast by making variable type match the type required by the
main usage with mincore.

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

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c?rev=691981&r1=691980&r2=691981&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
(original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/unix/OSMemoryLinux32.c
Thu Sep  4 04:52:20 2008
@@ -95,14 +95,14 @@
   	  jboolean result = 0;
   	  IDATA m_addr = (IDATA)addr;
 	  int page_size = getPageSize();
-	  char* vec = NULL;
+	  unsigned char* vec = NULL;
 	  int page_count = 0;
 	  int align_offset = m_addr%page_size;//addr should align with the boundary of a page.
 	  m_addr -= align_offset;
 	  size   += align_offset;
 	  page_count = (size+page_size-1)/page_size;
-	  vec = (char *) hymem_allocate_memory(page_count*sizeof(char));
-	  if(mincore((void *)m_addr, size , (unsigned char *)vec)==0) //or else there is error about
the mincore and return false;
+	  vec = (unsigned char*) hymem_allocate_memory(page_count*sizeof(char));
+	  if(mincore((void *)m_addr, size , vec)==0) //or else there is error about the mincore
and return false;
 	  {
 	  	  int i;
 		  for(i=0 ;i<page_count;i++)



Mime
View raw message