diff test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetOwnedMonitorInfo/ownmoninf001/ownmoninf001.cpp @ 53610:9cfc8b0c45fd

8214149: Move out assignments when not using NSK*VERIFY macros Summary: Move out the assignments from ifs Reviewed-by: sspitsyn, cjplummer
author jcbeyler
date Wed, 21 Nov 2018 10:46:45 -0800
parents b613bf6a10b1
children
line wrap: on
line diff
--- a/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetOwnedMonitorInfo/ownmoninf001/ownmoninf001.cpp	Wed Nov 21 18:44:11 2018 +0000
+++ b/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetOwnedMonitorInfo/ownmoninf001/ownmoninf001.cpp	Wed Nov 21 10:46:45 2018 -0800
@@ -122,7 +122,8 @@
 Java_nsk_jvmti_GetOwnedMonitorInfo_ownmoninf001_checkMon1(JNIEnv *env,
         jclass cls, jint point, jthread thr, jobject lock) {
     jobject *monitors;
-    if ((monitors = getInfo(env, point, thr, 1)) == NULL) {
+    monitors = getInfo(env, point, thr, 1);
+    if (monitors == NULL) {
         return;
     }
     if (!env->IsSameObject(lock, monitors[0])) {
@@ -135,7 +136,8 @@
 Java_nsk_jvmti_GetOwnedMonitorInfo_ownmoninf001_checkMon2(JNIEnv *env,
         jclass cls, jint point, jthread thr, jobject lock1, jobject lock2) {
     jobject *monitors;
-    if ((monitors = getInfo(env, point, thr, 2)) == NULL) {
+    monitors = getInfo(env, point, thr, 2);
+    if (monitors == NULL) {
         return;
     }
     if (!env->IsSameObject(lock1, monitors[0]) && !env->IsSameObject(lock2, monitors[0])) {