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 {
*
* \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;
if (!*cursor) {
XBT_DEBUG("Create the cursor on first use");
*cursor = xbt_new(s_xbt_set_cursor_t, 1);
- xbt_assert0(*cursor,
+ xbt_assert(*cursor,
"Malloc error during the creation of the cursor");
}
(*cursor)->set = set;
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);