double percent;
int status = cf_util_get_double(ci, &percent);
if (status != 0)
return status;
if ((percent <= 0.0) || (percent >= 100)) {
double percent;
int status = cf_util_get_double(ci, &percent);
if (status != 0)
return status;
if ((percent <= 0.0) || (percent >= 100)) {
return ERANGE;
}
double *tmp = realloc(conf->percentile,
sizeof(*conf->percentile) * (conf->percentile_num + 1));
if (tmp == NULL) {
return ERANGE;
}
double *tmp = realloc(conf->percentile,
sizeof(*conf->percentile) * (conf->percentile_num + 1));
if (tmp == NULL) {
if ((ci->values_num != 2) || (ci->values[0].type != OCONFIG_TYPE_NUMBER) ||
(ci->values[1].type != OCONFIG_TYPE_NUMBER)) {
if ((ci->values_num != 2) || (ci->values[0].type != OCONFIG_TYPE_NUMBER) ||
(ci->values[1].type != OCONFIG_TYPE_NUMBER)) {
int status = 0;
for (int i = 0; i < ci->children_num; i++) {
oconfig_item_t *child = ci->children + i;
if (strcasecmp("Percentile", child->key) == 0)
int status = 0;
for (int i = 0; i < ci->children_num; i++) {
oconfig_item_t *child = ci->children + i;
if (strcasecmp("Percentile", child->key) == 0)
else if (strcasecmp("BucketType", child->key) == 0)
status = cf_util_get_string(child, &conf->bucket_type);
else
else if (strcasecmp("BucketType", child->key) == 0)
status = cf_util_get_string(child, &conf->bucket_type);
else
- WARNING("%s plugin: \"%s\" is not a valid option within a \"%s\" block.",
- plugin, child->key, ci->key);
+ P_WARNING("\"%s\" is not a valid option within a \"%s\" block.",
+ child->key, ci->key);
- ERROR("%s plugin: The \"%s\" block must contain at least one "
- "\"Percentile\" or \"Bucket\" option.",
- plugin, ci->key);
+ P_ERROR("The \"%s\" block must contain at least one "
+ "\"Percentile\" or \"Bucket\" option.",
+ ci->key);