X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fthreshold.c;h=f2407d2875579bc89a95ae236c01a58d3c213118;hb=be126043c2be20399d7670fe194645292018bde0;hp=72e922e90583b0e5ba2dfce2191800f3b11f06e5;hpb=b165cd13cd30a30ac830df1f6f6fbd52474a6f64;p=collectd.git diff --git a/src/threshold.c b/src/threshold.c index 72e922e9..f2407d28 100644 --- a/src/threshold.c +++ b/src/threshold.c @@ -424,22 +424,22 @@ static int ut_report_state(const data_set_t *ds, const value_list_t *vl, n.time = vl->time; - status = ssnprintf(buf, bufsize, "Host %s, plugin %s", vl->host, vl->plugin); + status = snprintf(buf, bufsize, "Host %s, plugin %s", vl->host, vl->plugin); buf += status; bufsize -= status; if (vl->plugin_instance[0] != '\0') { - status = ssnprintf(buf, bufsize, " (instance %s)", vl->plugin_instance); + status = snprintf(buf, bufsize, " (instance %s)", vl->plugin_instance); buf += status; bufsize -= status; } - status = ssnprintf(buf, bufsize, " type %s", vl->type); + status = snprintf(buf, bufsize, " type %s", vl->type); buf += status; bufsize -= status; if (vl->type_instance[0] != '\0') { - status = ssnprintf(buf, bufsize, " (instance %s)", vl->type_instance); + status = snprintf(buf, bufsize, " (instance %s)", vl->type_instance); buf += status; bufsize -= status; } @@ -454,9 +454,9 @@ static int ut_report_state(const data_set_t *ds, const value_list_t *vl, /* Send an okay notification */ if (state == STATE_OKAY) { if (state_old == STATE_MISSING) - ssnprintf(buf, bufsize, ": Value is no longer missing."); + snprintf(buf, bufsize, ": Value is no longer missing."); else - ssnprintf(buf, bufsize, ": All data sources are within range again. " + snprintf(buf, bufsize, ": All data sources are within range again. " "Current value of \"%s\" is %f.", ds->ds[ds_index].name, values[ds_index]); } else { @@ -468,7 +468,7 @@ static int ut_report_state(const data_set_t *ds, const value_list_t *vl, if (th->flags & UT_FLAG_INVERT) { if (!isnan(min) && !isnan(max)) { - ssnprintf(buf, bufsize, + snprintf(buf, bufsize, ": Data source \"%s\" is currently " "%f. That is within the %s region of %f%s and %f%s.", ds->ds[ds_index].name, values[ds_index], @@ -476,7 +476,7 @@ static int ut_report_state(const data_set_t *ds, const value_list_t *vl, ((th->flags & UT_FLAG_PERCENTAGE) != 0) ? "%" : "", max, ((th->flags & UT_FLAG_PERCENTAGE) != 0) ? "%" : ""); } else { - ssnprintf(buf, bufsize, ": Data source \"%s\" is currently " + snprintf(buf, bufsize, ": Data source \"%s\" is currently " "%f. That is %s the %s threshold of %f%s.", ds->ds[ds_index].name, values[ds_index], isnan(min) ? "below" : "above", @@ -501,7 +501,7 @@ static int ut_report_state(const data_set_t *ds, const value_list_t *vl, else value = 100.0 * values[ds_index] / sum; - ssnprintf(buf, bufsize, + snprintf(buf, bufsize, ": Data source \"%s\" is currently " "%g (%.2f%%). That is %s the %s threshold of %.2f%%.", ds->ds[ds_index].name, values[ds_index], value, @@ -510,7 +510,7 @@ static int ut_report_state(const data_set_t *ds, const value_list_t *vl, (value < min) ? min : max); } else /* is not inverted */ { - ssnprintf(buf, bufsize, ": Data source \"%s\" is currently " + snprintf(buf, bufsize, ": Data source \"%s\" is currently " "%f. That is %s the %s threshold of %f.", ds->ds[ds_index].name, values[ds_index], (values[ds_index] < min) ? "below" : "above", @@ -772,7 +772,7 @@ static int ut_missing(const value_list_t *vl, FORMAT_VL(identifier, sizeof(identifier), vl); NOTIFICATION_INIT_VL(&n, vl); - ssnprintf(n.message, sizeof(n.message), + snprintf(n.message, sizeof(n.message), "%s has not been updated for %.3f seconds.", identifier, CDTIME_T_TO_DOUBLE(missing_time)); n.time = now;