< prev index next >

src/share/vm/utilities/workgroup.cpp

Print this page
rev 7793 : 8073315: Enable gcc -Wtype-limits and fix upcoming issues.

@@ -122,11 +122,11 @@
 
 GangWorker* AbstractWorkGang::gang_worker(uint i) const {
   // Array index bounds checking.
   GangWorker* result = NULL;
   assert(gang_workers() != NULL, "No workers for indexing");
-  assert(((i >= 0) && (i < total_workers())), "Worker index out of bounds");
+  assert(i < total_workers(), "Worker index out of bounds");
   result = _gang_workers[i];
   assert(result != NULL, "Indexing to null worker");
   return result;
 }
 

@@ -460,11 +460,11 @@
   _claimed = 0;
 #endif
 }
 
 bool SubTasksDone::is_task_claimed(uint t) {
-  assert(0 <= t && t < _n_tasks, "bad task id.");
+  assert(t < _n_tasks, "bad task id.");
   uint old = _tasks[t];
   if (old == 0) {
     old = Atomic::cmpxchg(1, &_tasks[t], 0);
   }
   assert(_tasks[t] == 1, "What else?");
< prev index next >