< prev index next >

test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/sharedAgents/simpleAgent00.cpp

Print this page
rev 52233 : 8212884: Remove the assignments in ifs for vmTestbase/[a-s]
Summary:
Reviewed-by:

@@ -52,19 +52,22 @@
     jvmtiEnv* jvmti;
     JNIEnv* jni = NULL;
     Options* options = NULL;
     const char* agentName;
 
-    if (!NSK_VERIFY((options = (Options*) nsk_aod_createOptions(optionsString)) != NULL))
+    options = (Options*) nsk_aod_createOptions(optionsString);
+    if (!NSK_VERIFY(options != NULL))
         return JNI_ERR;
 
     agentName = nsk_aod_getOptionValue(options, NSK_AOD_AGENT_NAME_OPTION);
 
-    if ((jni = (JNIEnv*) nsk_aod_createJNIEnv(vm)) == NULL)
+    jni = (JNIEnv*) nsk_aod_createJNIEnv(vm);
+    if (jni == NULL)
         return JNI_ERR;
 
-    if (!NSK_VERIFY((jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved)) != NULL))
+    jvmti = nsk_jvmti_createJVMTIEnv(vm, reserved);
+    if (!NSK_VERIFY(jvmti != NULL))
         return JNI_ERR;
 
     NSK_DISPLAY1("%s: initialization was done\n", agentName);
 
     if (!NSK_VERIFY(nsk_aod_agentLoaded(jni, agentName)))
< prev index next >