// remove a peer from the list
xbt_dict_cursor_t cursor = NULL;
xbt_dict_cursor_first(peer->active_peers, &cursor);
- if (xbt_dict_length(peer->active_peers) > 0) {
+ if (!xbt_dict_is_empty(peer->active_peers)) {
key_choked = xbt_dict_cursor_get_key(cursor);
peer_choked = xbt_dict_cursor_get_data(cursor);
}