diff options
author | Mark Wielaard <mark@klomp.org> | 2007-06-25 09:44:35 +0000 |
---|---|---|
committer | Mark Wielaard <mark@klomp.org> | 2007-06-25 09:44:35 +0000 |
commit | 38d71ece08e54b4c738f17049a9bb4e84c616b77 (patch) | |
tree | 6760418c50f22f1c7bbe61d721dd17e7856f2aa2 /native | |
parent | 44a90baeafad37be5995b092a37dea635c617190 (diff) | |
download | classpath-38d71ece08e54b4c738f17049a9bb4e84c616b77.tar.gz |
* native/jni/native-lib/cpnet.c
(cpnet_aton) Moved variable declaration of inet6_addr so it is
actually in the scope of its use.
Diffstat (limited to 'native')
-rw-r--r-- | native/jni/native-lib/cpnet.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/native/jni/native-lib/cpnet.c b/native/jni/native-lib/cpnet.c index 7017fc172..044498113 100644 --- a/native/jni/native-lib/cpnet.c +++ b/native/jni/native-lib/cpnet.c @@ -767,6 +767,10 @@ jint cpnet_aton (JNIEnv *env, const char *hostname, cpnet_address **addr) { jbyte *bytes = NULL; +#if defined(HAVE_INET_PTON) && defined(HAVE_INET6) + jbyte inet6_addr[16]; +#endif + #ifdef HAVE_INET_ATON struct in_addr laddr; if (inet_aton (hostname, &laddr)) @@ -793,8 +797,6 @@ jint cpnet_aton (JNIEnv *env, const char *hostname, cpnet_address **addr) #if defined(HAVE_INET_PTON) && defined(HAVE_INET6) if (inet_pton (AF_INET6, hostname, inet6_addr) > 0) { - jbyte inet6_addr[16]; - *addr = cpnet_newIPV6Address(env); cpnet_bytesToIPV6Address(*addr, inet6_addr); return 0; |