Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
8207e828
Commit
8207e828
authored
May 22, 2016
by
oranagra
Committed by
antirez
Jun 17, 2016
Browse files
config set list-max-ziplist-size didn't support negative values, unlike config file
parent
6ad0371c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
8207e828
...
@@ -682,7 +682,7 @@ void loadServerConfig(char *filename, char *options) {
...
@@ -682,7 +682,7 @@ void loadServerConfig(char *filename, char *options) {
#define config_set_numerical_field(_name,_var,min,max) \
#define config_set_numerical_field(_name,_var,min,max) \
} else if (!strcasecmp(c->argv[2]->ptr,_name)) { \
} 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 (min != LLONG_MIN && ll < min) goto badfmt; \
if (max != LLONG_MAX && ll > max) goto badfmt; \
if (max != LLONG_MAX && ll > max) goto badfmt; \
_var = ll;
_var = ll;
...
@@ -902,9 +902,9 @@ void configSetCommand(client *c) {
...
@@ -902,9 +902,9 @@ void configSetCommand(client *c) {
}
config_set_numerical_field
(
}
config_set_numerical_field
(
"hash-max-ziplist-value"
,
server
.
hash_max_ziplist_value
,
0
,
LLONG_MAX
)
{
"hash-max-ziplist-value"
,
server
.
hash_max_ziplist_value
,
0
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
}
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
(
}
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
(
}
config_set_numerical_field
(
"set-max-intset-entries"
,
server
.
set_max_intset_entries
,
0
,
LLONG_MAX
)
{
"set-max-intset-entries"
,
server
.
set_max_intset_entries
,
0
,
LLONG_MAX
)
{
}
config_set_numerical_field
(
}
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