- remove dead assignments
[oweals/gnunet.git] / src / testbed / testbed_api_operations.c
index fd1df0e76361cdee0b18f384dd391fa275297f60..a418de91073f69266cab8643b8a7bcbd2b0dda86 100644 (file)
@@ -470,7 +470,6 @@ decide_capacity (struct OperationQueue *opq,
   rval = GNUNET_YES;
   if (opq->active > opq->max_active)
   {
-    need += opq->active - opq->max_active;
     rval = GNUNET_NO;
     goto ret;
   }
@@ -497,8 +496,12 @@ decide_capacity (struct OperationQueue *opq,
 
  ret:
   GNUNET_free_non_null (evict_entries);  
-  if (NULL != ops_) *ops_ = ops;
-  if (NULL != n_ops_) *n_ops_ = n_ops;
+  if (NULL != ops_)
+    *ops_ = ops;
+  else
+    GNUNET_free (ops);
+  if (NULL != n_ops_)
+    *n_ops_ = n_ops;
   return rval;
 }
 
@@ -547,9 +550,6 @@ merge_ops (struct GNUNET_TESTBED_Operation ***old,
  * Checks for the readiness of an operation and schedules a operation start task
  *
  * @param op the operation
- * @param GNUNET_NO if the given operation cannot be made active; GNUNET_YES if
- *          it can be activated (has enough resources) and is kept in ready
- *          queue
  */
 static int
 check_readiness (struct GNUNET_TESTBED_Operation *op)