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
5fa711fa
Commit
5fa711fa
authored
May 22, 2016
by
oranagra
Browse files
config set list-max-ziplist-size didn't support negative values, unlike config file
parent
b09a6b6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
5fa711fa
...
...
@@ -719,7 +719,7 @@ void loadServerConfig(char *filename, char *options) {
#define config_set_numerical_field(_name,_var,min,max) \
} else if (!strcasecmp(c->argv[2]->ptr,_name)) { \
if (getLongLongFromObject(o,&ll) == C_ERR
|| ll < 0
) goto badfmt; \
if (getLongLongFromObject(o,&ll) == C_ERR) goto badfmt; \
if (min != LLONG_MIN && ll < min) goto badfmt; \
if (max != LLONG_MAX && ll > max) goto badfmt; \
_var = ll;
...
...
@@ -950,9 +950,9 @@ void configSetCommand(client *c) {
}
config_set_numerical_field
(
"hash-max-ziplist-value"
,
server
.
hash_max_ziplist_value
,
0
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
"list-max-ziplist-size"
,
server
.
list_max_ziplist_size
,
0
,
LLONG
_MAX
)
{
"list-max-ziplist-size"
,
server
.
list_max_ziplist_size
,
INT_MIN
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"list-compress-depth"
,
server
.
list_compress_depth
,
0
,
LLONG
_MAX
)
{
"list-compress-depth"
,
server
.
list_compress_depth
,
0
,
INT
_MAX
)
{
}
config_set_numerical_field
(
"set-max-intset-entries"
,
server
.
set_max_intset_entries
,
0
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
...
...
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