vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "vserver", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "vserver", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
vl.values = values;
vl.values_len = STATIC_ARRAY_SIZE (values);
- vl.time = time (NULL);
sstrncpy (vl.host, hostname_g, sizeof (vl.host));
sstrncpy (vl.plugin, "vserver", sizeof (vl.plugin));
sstrncpy (vl.plugin_instance, plugin_instance, sizeof (vl.plugin_instance));
while (42)
{
- size_t len;
+ int len;
char file[BUFSIZE];
FILE *fh;
if (dent->d_name[0] == '.')
continue;
- len = snprintf (file, sizeof (file), PROCDIR "/%s", dent->d_name);
+ len = ssnprintf (file, sizeof (file), PROCDIR "/%s", dent->d_name);
if ((len < 0) || (len >= BUFSIZE))
continue;
/* socket message accounting */
len = ssnprintf (file, sizeof (file),
PROCDIR "/%s/cacct", dent->d_name);
- if ((len < 0) || (len >= sizeof (file)))
+ if ((len < 0) || ((size_t) len >= sizeof (file)))
continue;
if (NULL == (fh = fopen (file, "r")))
/* thread information and load */
len = ssnprintf (file, sizeof (file),
PROCDIR "/%s/cvirt", dent->d_name);
- if ((len < 0) || (len >= sizeof (file)))
+ if ((len < 0) || ((size_t) len >= sizeof (file)))
continue;
if (NULL == (fh = fopen (file, "r")))
/* processes and memory usage */
len = ssnprintf (file, sizeof (file),
PROCDIR "/%s/limit", dent->d_name);
- if ((len < 0) || (len >= sizeof (file)))
+ if ((len < 0) || ((size_t) len >= sizeof (file)))
continue;
if (NULL == (fh = fopen (file, "r")))