Skip to content

Commit

Permalink
remove useless dictFreeIterator
Browse files Browse the repository at this point in the history
  • Loading branch information
enjoy-binbin committed Feb 7, 2024
1 parent ad809a3 commit c9ed2e0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
9 changes: 1 addition & 8 deletions src/dict.c
Original file line number Diff line number Diff line change
Expand Up @@ -1036,17 +1036,10 @@ dictEntry *dictNext(dictIterator *iter)
return NULL;
}

/* Free the iterator. */
void dictFreeIterator(dictIterator *iter)
{
zfree(iter);
}

/* Reset the iterator and free the iterator. */
void dictReleaseIterator(dictIterator *iter)
{
dictResetIterator(iter);
dictFreeIterator(iter);
zfree(iter);
}

/* Return a random entry from the hash table. Useful to
Expand Down
1 change: 0 additions & 1 deletion src/dict.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ void dictInitIterator(dictIterator *iter, dict *d);
void dictInitSafeIterator(dictIterator *iter, dict *d);
void dictResetIterator(dictIterator *iter);
dictEntry *dictNext(dictIterator *iter);
void dictFreeIterator(dictIterator *iter);
void dictReleaseIterator(dictIterator *iter);
dictEntry *dictGetRandomKey(dict *d);
dictEntry *dictGetFairRandomKey(dict *d);
Expand Down

0 comments on commit c9ed2e0

Please sign in to comment.