harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r577306 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
Date Wed, 19 Sep 2007 13:53:58 GMT
Author: hindessm
Date: Wed Sep 19 06:53:57 2007
New Revision: 577306

URL: http://svn.apache.org/viewvc?rev=577306&view=rev
Log:
Remove function that is a trivial wrapper around a macro.
Make variable names in similar code more consistent.

Modified:
    harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c

Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c?rev=577306&r1=577305&r2=577306&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c (original)
+++ harmony/enhanced/classlib/trunk/modules/luni/src/main/native/luni/shared/nethelp.c Wed
Sep 19 06:53:57 2007
@@ -1302,17 +1302,11 @@
 
 }
 
-jfieldID
-getJavaIoFileDescriptorDescriptor (JNIEnv * env)
-{
-  return HARMONY_CACHE_GET (env, FID_java_io_FileDescriptor_descriptor);
-}
-
 void
 setJavaIoFileDescriptorContents (JNIEnv * env, jobject fd,
                                           void *value)
 {
-  jfieldID fid = getJavaIoFileDescriptorDescriptor (env);
+  jfieldID fid = HARMONY_CACHE_GET(env, FID_java_io_FileDescriptor_descriptor);
   if (NULL != fid)
     {
       (*env)->SetLongField (env, fd, fid, (jlong) ((IDATA)value));
@@ -1322,12 +1316,12 @@
 void *
 getJavaIoFileDescriptorContentsAsAPointer (JNIEnv * env, jobject fd)
 {
-  jfieldID descriptorFID = getJavaIoFileDescriptorDescriptor (env);
-  if (NULL == descriptorFID)
+  jfieldID fid = HARMONY_CACHE_GET(env, FID_java_io_FileDescriptor_descriptor);
+  if (NULL == fid)
     {
       return (void *) -1;
     }
-  return (void *) ((IDATA)((*env)->GetLongField (env, fd, descriptorFID)));
+  return (void *) ((IDATA)((*env)->GetLongField (env, fd, fid)));
 }
 		
 jobject getJavaNioChannelsSocketChannelImplObj(JNIEnv * env, jclass channel_class){



Mime
View raw message