]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
natObject.cc (_Jv_MonitorEnter): Add missing parenthesis around comparison with ...
authorUros Bizjak <ubizjak@gmail.com>
Tue, 11 Mar 2014 16:41:07 +0000 (17:41 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Tue, 11 Mar 2014 16:41:07 +0000 (17:41 +0100)
* java/lang/natObject.cc (_Jv_MonitorEnter): Add missing parenthesis
around comparison with (address | LOCKED) in JvAssert.

From-SVN: r208489

libjava/ChangeLog
libjava/java/lang/natObject.cc

index 93fb0d240c1294156cf8dc569d0f98dff30e4f09..28468725b6fe705232218f77e3c74d5e70bb5224 100644 (file)
@@ -1,3 +1,8 @@
+2014-03-11  Uros Bizjak  <ubizjak@gmail.com>
+
+       * java/lang/natObject.cc (_Jv_MonitorEnter): Add missing parenthesis
+       around comparison with (address | LOCKED) in JvAssert.
+
 2014-02-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        PR libgcj/55637
index 87f2044dd86a628dbad8faa77b81adb20d3f32fe..1a666407a6632ee636ba59111a3a47a40b6b3fd9 100644 (file)
@@ -929,7 +929,7 @@ retry:
          // only be held by other threads waiting for conversion, and
          // they, like us, drop it quickly without blocking.
          _Jv_MutexLock(&(hl->si.mutex));
-         JvAssert(he -> address == address | LOCKED );
+         JvAssert(he -> address == (address | LOCKED));
          release_set(&(he -> address), (address | REQUEST_CONVERSION | HEAVY));
                                // release lock on he
          LOG(REQ_CONV, (address | REQUEST_CONVERSION | HEAVY), self);
@@ -961,7 +961,7 @@ retry:
     }
   obj_addr_t was_heavy = (address & HEAVY);
   if ((address & LOCKED) ||
-      !compare_and_swap(&(he -> address), address, (address | LOCKED )))
+      !compare_and_swap(&(he -> address), address, address | LOCKED ))
     {
       wait_unlocked(he);
       goto retry;