* What's the right thing to do, if there is no getpagesize ()? */
pagesize = getpagesize();
- return (0);
+ return 0;
} /* static void vserver_init(void) */
static void traffic_submit(const char *plugin_instance,
status = parse_value(s, &v, DS_TYPE_DERIVE);
if (status != 0)
- return (-1);
- return (v.derive);
+ return -1;
+ return v.derive;
}
static int vserver_read(void) {
char errbuf[1024];
ERROR("vserver plugin: fopen (%s): %s", PROCDIR,
sstrerror(errno, errbuf, sizeof(errbuf)));
- return (-1);
+ return -1;
}
while (42) {
ERROR("vserver plugin: failed to read directory %s: %s", PROCDIR,
sstrerror(errno, errbuf, sizeof(errbuf)));
closedir(proc);
- return (-1);
+ return -1;
}
if (dent->d_name[0] == '.')
continue;
- len = ssnprintf(file, sizeof(file), PROCDIR "/%s", dent->d_name);
+ len = snprintf(file, sizeof(file), PROCDIR "/%s", dent->d_name);
if ((len < 0) || (len >= BUFSIZE))
continue;
continue;
/* socket message accounting */
- len = ssnprintf(file, sizeof(file), PROCDIR "/%s/cacct", dent->d_name);
+ len = snprintf(file, sizeof(file), PROCDIR "/%s/cacct", dent->d_name);
if ((len < 0) || ((size_t)len >= sizeof(file)))
continue;
}
/* thread information and load */
- len = ssnprintf(file, sizeof(file), PROCDIR "/%s/cvirt", dent->d_name);
+ len = snprintf(file, sizeof(file), PROCDIR "/%s/cvirt", dent->d_name);
if ((len < 0) || ((size_t)len >= sizeof(file)))
continue;
}
/* processes and memory usage */
- len = ssnprintf(file, sizeof(file), PROCDIR "/%s/limit", dent->d_name);
+ len = snprintf(file, sizeof(file), PROCDIR "/%s/limit", dent->d_name);
if ((len < 0) || ((size_t)len >= sizeof(file)))
continue;
closedir(proc);
- return (0);
+ return 0;
} /* int vserver_read */
void module_register(void) {