*/
XBT_INLINE unsigned int xbt_dict_size(xbt_dict_t dict)
{
- return dict->count;
+ return (dict ? (unsigned int) dict->count : (unsigned int) 0);
}
/**
current = dict->table[hash_code & dict->table_size];
while (current != NULL &&
- hash_code != current->hash_code && strcmp(key, current->key))
+ (hash_code != current->hash_code || strcmp(key, current->key)))
current = current->next;
if (current == NULL)
*/
XBT_INLINE int xbt_dict_is_empty(xbt_dict_t dict)
{
- return (xbt_dict_length(dict) == 0);
+ return (xbt_dict_size(dict) == 0);
}
/**