src/utils_threshold.c: Check that the <Threshold> block does not have any arguments.
[collectd.git] / src / utils_threshold.c
index 9365a4a..15ccf9c 100644 (file)
@@ -380,6 +380,13 @@ int ut_config (const oconfig_item_t *ci)
 
   threshold_t th;
 
+  if (ci->values_num != 0)
+  {
+    ERROR ("threshold values: The `Threshold' block may not have any "
+       "arguments.");
+    return (-1);
+  }
+
   if (threshold_tree == NULL)
   {
     threshold_tree = c_avl_create ((void *) strcmp);