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
0b4b7ebd
Commit
0b4b7ebd
authored
Jun 17, 2016
by
Salvatore Sanfilippo
Committed by
GitHub
Jun 17, 2016
Browse files
Merge pull request #3252 from oranagra/config_fix
fix: config set list-max-ziplist-size didn't support negative values
parents
f7351f4c
5fa711fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/config.c
View file @
0b4b7ebd
...
@@ -733,7 +733,7 @@ void loadServerConfig(char *filename, char *options) {
...
@@ -733,7 +733,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;
...
@@ -964,9 +964,9 @@ void configSetCommand(client *c) {
...
@@ -964,9 +964,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