Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b362a1b7
Commit
b362a1b7
authored
Oct 01, 2018
by
Hamid Alaei
Committed by
antirez
Oct 03, 2018
Browse files
fix dict get on not found
parent
55e9df8a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/module.c
View file @
b362a1b7
...
...
@@ -4419,7 +4419,7 @@ int RM_DictReplace(RedisModuleDict *d, RedisModuleString *key, void *ptr) {
void
*
RM_DictGetC
(
RedisModuleDict
*
d
,
void
*
key
,
size_t
keylen
,
int
*
nokey
)
{
void
*
res
=
raxFind
(
d
->
rax
,
key
,
keylen
);
if
(
nokey
)
*
nokey
=
(
res
==
raxNotFound
);
return
res
;
return
(
res
==
raxNotFound
)
?
NULL
:
res
;
}
/* Like RedisModule_DictGetC() but takes the key as a RedisModuleString. */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment