Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : break forgotten in switch
[simgrid.git] / src / xbt / set.c
index f0d6b90..9158305 100644 (file)
@@ -57,7 +57,7 @@ void xbt_set_free(xbt_set_t * set)
 static int _xbt_set_get_id(xbt_set_t set)
 {
   int id;
-  if (xbt_dynar_length(set->available_ids) > 0) {
+  if (!xbt_dynar_is_empty(set->available_ids)) {
     /* if there are some available ids */
     xbt_dynar_pop(set->available_ids, &id);
   } else {
@@ -71,7 +71,7 @@ static int _xbt_set_get_id(xbt_set_t set)
  *
  * \param set set to populate
  * \param elm element to add.
- * \param free_func How to add the data
+ * \param free_func how to free the data
  *
  * elm->name must be set;
  * if elm->name_len <= 0, it is recomputed. If >0, it's used as is;
@@ -434,7 +434,8 @@ static void search_not_found(xbt_set_t set, const char *data)
     xbt_set_get_by_name(set, data);
     THROWF(unknown_error, 0,
            "Found something which shouldn't be there (%s)", data);
-  } CATCH(e) {
+  }
+  CATCH(e) {
     if (e.category != not_found_error)
       xbt_test_exception(e);
     xbt_ex_free(e);