*/
#include "collectd.h"
+
#include "common.h" /* auxiliary functions */
#include "plugin.h" /* plugin_register_*, plugin_dispatch_values */
if (chrony_set_timeout())
{
- ERROR(PLUGIN_NAME ": Error setting timeout to %lds. Errno = %d",
- g_chrony_timeout, errno);
+ ERROR(PLUGIN_NAME ": Error setting timeout to %llds. Errno = %d",
+ (long long)g_chrony_timeout, errno);
return CHRONY_RC_FAIL;
}
return CHRONY_RC_OK;
{
/* collectd read callback: Perform data acquisition */
int rc;
- unsigned int now_src, n_sources;
+ unsigned int n_sources;
if (g_chrony_seq_is_initialized == 0)
{
if (rc != CHRONY_RC_OK)
return rc;
- for (now_src = 0; now_src < n_sources; ++now_src)
+ for (unsigned int now_src = 0; now_src < n_sources; ++now_src)
{
int is_reachable;
rc = chrony_request_source_data(now_src, &is_reachable);