projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
src/daemon/collectd.c: Fix implementation of the -B option.
[collectd.git]
/
src
/
vserver.c
diff --git
a/src/vserver.c
b/src/vserver.c
index
96af6fc
..
6f9d46b
100644
(file)
--- a/
src/vserver.c
+++ b/
src/vserver.c
@@
-49,7
+49,7
@@
static int vserver_init(void) {
* What's the right thing to do, if there is no getpagesize ()? */
pagesize = getpagesize();
* 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,
} /* static void vserver_init(void) */
static void traffic_submit(const char *plugin_instance,
@@
-114,8
+114,8
@@
static derive_t vserver_get_sock_bytes(const char *s) {
status = parse_value(s, &v, DS_TYPE_DERIVE);
if (status != 0)
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) {
}
static int vserver_read(void) {
@@
-127,7
+127,7
@@
static int vserver_read(void) {
char errbuf[1024];
ERROR("vserver plugin: fopen (%s): %s", PROCDIR,
sstrerror(errno, errbuf, sizeof(errbuf)));
char errbuf[1024];
ERROR("vserver plugin: fopen (%s): %s", PROCDIR,
sstrerror(errno, errbuf, sizeof(errbuf)));
- return
(-1)
;
+ return
-1
;
}
while (42) {
}
while (42) {
@@
-154,13
+154,13
@@
static int vserver_read(void) {
ERROR("vserver plugin: failed to read directory %s: %s", PROCDIR,
sstrerror(errno, errbuf, sizeof(errbuf)));
closedir(proc);
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;
}
if (dent->d_name[0] == '.')
continue;
- len = s
s
nprintf(file, sizeof(file), PROCDIR "/%s", dent->d_name);
+ len = snprintf(file, sizeof(file), PROCDIR "/%s", dent->d_name);
if ((len < 0) || (len >= BUFSIZE))
continue;
if ((len < 0) || (len >= BUFSIZE))
continue;
@@
-176,7
+176,7
@@
static int vserver_read(void) {
continue;
/* socket message accounting */
continue;
/* socket message accounting */
- len = s
s
nprintf(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;
if ((len < 0) || ((size_t)len >= sizeof(file)))
continue;
@@
-220,7
+220,7
@@
static int vserver_read(void) {
}
/* thread information and load */
}
/* thread information and load */
- len = s
s
nprintf(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;
if ((len < 0) || ((size_t)len >= sizeof(file)))
continue;
@@
-266,7
+266,7
@@
static int vserver_read(void) {
}
/* processes and memory usage */
}
/* processes and memory usage */
- len = s
s
nprintf(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;
if ((len < 0) || ((size_t)len >= sizeof(file)))
continue;
@@
-314,7
+314,7
@@
static int vserver_read(void) {
closedir(proc);
closedir(proc);
- return
(0)
;
+ return
0
;
} /* int vserver_read */
void module_register(void) {
} /* int vserver_read */
void module_register(void) {