if (ed->all[current].len == len)
{
if (ed->all[current].str &&
- (ed->all[current].str == string || strcmp(ed->all[current].str, string) == 0))
+ ((ed->all[current].str == string) ||
+ (!strcmp(ed->all[current].str, string))))
{
found = EINA_TRUE;
break;
current = ed->all[current].next;
}
- if (current == -1 && found)
+ if ((current == -1) && found)
return prev;
return current;
int hash;
int idx;
int len;
+ int cnt;
if (!ed)
return -1;
if (idx != -1)
{
- if (ed->all[idx].str && (ed->all[idx].str == string || strcmp(ed->all[idx].str, string) == 0))
+ if (ed->all[idx].str &&
+ ((ed->all[idx].str == string) ||
+ (!strcmp(ed->all[idx].str, string))))
{
eina_lock_release(&ed->mutex);
return idx;
ed->hash[hash] = ed->count;
}
+ ed->count++;
+ cnt = ed->count;
eina_lock_release(&ed->mutex);
- return ed->count++;
+ return cnt;
on_error:
eina_lock_release(&ed->mutex);