summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0643de0)
raw | patch | inline | side by side (parent: 0643de0)
author | Yves Mettier <ymettier@free.fr> | |
Fri, 26 Apr 2013 09:50:18 +0000 (11:50 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Sat, 13 Jul 2013 06:40:40 +0000 (08:40 +0200) |
Signed-off-by: Florian Forster <octo@collectd.org>
src/configfile.c | patch | blob | history | |
src/plugin.c | patch | blob | history |
diff --git a/src/configfile.c b/src/configfile.c
index 193e05d247e4db765f528dffc0cbdc692f25907d..044180ee83a3aa646ec49406e09c7836563716cb 100644 (file)
--- a/src/configfile.c
+++ b/src/configfile.c
@@ -936,7 +936,7 @@ long global_option_get_long_in_range (const char *option, long default_value, lo
{
long value;
- assert(min < max);
+ assert(min <= max);
value = global_option_get_long(option, default_value);
if(value < min) return(default_value);
if(value > max) return(default_value);
diff --git a/src/plugin.c b/src/plugin.c
index 4f1f6e16d504b59554026dd6531259d07b85d8a9..0aee64667d200651b548573bb30138e5c04fb8bb 100644 (file)
--- a/src/plugin.c
+++ b/src/plugin.c
post_cache_chain = fc_chain_get_by_name (chain_name);
write_limit_high = global_option_get_long_in_range("WriteQueueLengthLimitHigh",0, 0, LONG_MAX);
- write_limit_low = global_option_get_long_in_range("WriteQueueLengthLimitLow", (write_limit_high+1)/2, 0, write_limit_high-1 );
+ write_limit_low = global_option_get_long_in_range("WriteQueueLengthLimitLow", (write_limit_high+1)/2, 0, (write_limit_high == 0) ? 0 : write_limit_high-1 );
{
char const *tmp = global_option_get ("WriteThreads");