diff options
author | antirez <antirez@gmail.com> | 2016-09-14 16:43:38 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2016-09-14 16:43:38 +0200 |
commit | 09a50d34a2e959be6b2fd1c6b7f51cb56c0d29d0 (patch) | |
tree | 7a571701b375813bcf780b1946ed740b042dad80 /src/dict.c | |
parent | 041ab04419235010c8f7a54f256a8701390370cd (diff) | |
download | redis-09a50d34a2e959be6b2fd1c6b7f51cb56c0d29d0.tar.gz |
dict.c: dictReplaceRaw() -> dictAddOrFind().
What they say about "naming things" in programming?
Diffstat (limited to 'src/dict.c')
-rw-r--r-- | src/dict.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dict.c b/src/dict.c index 5e327a794..04dfae6cc 100644 --- a/src/dict.c +++ b/src/dict.c @@ -395,13 +395,13 @@ int dictReplace(dict *d, void *key, void *val) } /* Add or Find: - * dictReplaceRaw() is simply a version of dictAddRaw() that always + * dictAddOrFind() is simply a version of dictAddRaw() that always * returns the hash entry of the specified key, even if the key already * exists and can't be added (in that case the entry of the already * existing key is returned.) * * See dictAddRaw() for more information. */ -dictEntry *dictReplaceRaw(dict *d, void *key) { +dictEntry *dictAddOrFind(dict *d, void *key) { dictEntry *entry, *existing; entry = dictAddRaw(d,key,&existing); return entry ? entry : existing; |