memcpy (&th, th_orig, sizeof (th));
sstrncpy (th.plugin, ci->values[0].value.string, sizeof (th.plugin));
memcpy (&th, th_orig, sizeof (th));
sstrncpy (th.plugin, ci->values[0].value.string, sizeof (th.plugin));
memcpy (&th, th_orig, sizeof (th));
sstrncpy (th.host, ci->values[0].value.string, sizeof (th.host));
memcpy (&th, th_orig, sizeof (th));
sstrncpy (th.host, ci->values[0].value.string, sizeof (th.host));
gauge_t values_copy[ds->ds_num];
memcpy (values_copy, values, sizeof (values_copy));
gauge_t values_copy[ds->ds_num];
memcpy (values_copy, values, sizeof (values_copy));
if ((num == 0) /* All data sources are undefined. */
|| (sum == 0.0)) /* Sum is zero, cannot calculate percentage. */
{
if ((num == 0) /* All data sources are undefined. */
|| (sum == 0.0)) /* Sum is zero, cannot calculate percentage. */
{
plugin_register_missing ("threshold", ut_missing,
/* user data = */ NULL);
plugin_register_write ("threshold", ut_check_threshold,
plugin_register_missing ("threshold", ut_missing,
/* user data = */ NULL);
plugin_register_write ("threshold", ut_check_threshold,