8053902: Fix for 8030115 breaks build on Windows and Solaris
authordsamersoff
Tue, 29 Jul 2014 13:08:27 -0700
changeset 25755 49d8c933dd62
parent 25754 2fc68d1b7c03
child 25794 f8fcbb8737be
8053902: Fix for 8030115 breaks build on Windows and Solaris Summary: Move variable definition to top of function Reviewed-by: prr
jdk/src/share/native/sun/tracing/dtrace/JVM.c
--- a/jdk/src/share/native/sun/tracing/dtrace/JVM.c	Tue Jul 29 10:06:02 2014 +0200
+++ b/jdk/src/share/native/sun/tracing/dtrace/JVM.c	Tue Jul 29 13:08:27 2014 -0700
@@ -184,6 +184,7 @@
     jlong handle = 0;
     jsize num_providers;
     jsize i;
+    jsize count = 0;
     JVM_DTraceProvider* jvm_providers;
 
     initialize();
@@ -197,7 +198,6 @@
     jvm_providers = (JVM_DTraceProvider*)calloc(
         num_providers, sizeof(*jvm_providers));
 
-    int count = 0;
     for (; count < num_providers; ++count) {
         JVM_DTraceProvider* p = &(jvm_providers[count]);
         jobject provider = (*env)->GetObjectArrayElement(