projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Tree wide: Replace sstrerror() with STRERROR().
[collectd.git]
/
src
/
cgroups.c
diff --git
a/src/cgroups.c
b/src/cgroups.c
index
9cb7cf9
..
4f34b3a
100644
(file)
--- a/
src/cgroups.c
+++ b/
src/cgroups.c
@@
-63,7
+63,7
@@
static int read_cpuacct_procs(const char *dirname, char const *cgroup_name,
if (ignorelist_match(il_cgroup, cgroup_name))
return 0;
if (ignorelist_match(il_cgroup, cgroup_name))
return 0;
- s
s
nprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, cgroup_name);
+ snprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, cgroup_name);
status = lstat(abs_path, &statbuf);
if (status != 0) {
status = lstat(abs_path, &statbuf);
if (status != 0) {
@@
-75,13
+75,11
@@
static int read_cpuacct_procs(const char *dirname, char const *cgroup_name,
if (!S_ISDIR(statbuf.st_mode))
return 0;
if (!S_ISDIR(statbuf.st_mode))
return 0;
- s
s
nprintf(abs_path, sizeof(abs_path), "%s/%s/cpuacct.stat", dirname,
-
cgroup_name);
+ snprintf(abs_path, sizeof(abs_path), "%s/%s/cpuacct.stat", dirname,
+ cgroup_name);
fh = fopen(abs_path, "r");
if (fh == NULL) {
fh = fopen(abs_path, "r");
if (fh == NULL) {
- char errbuf[1024];
- ERROR("cgroups plugin: fopen (\"%s\") failed: %s", abs_path,
- sstrerror(errno, errbuf, sizeof(errbuf)));
+ ERROR("cgroups plugin: fopen (\"%s\") failed: %s", abs_path, STRERRNO);
return -1;
}
return -1;
}
@@
-138,7
+136,7
@@
static int read_cpuacct_root(const char *dirname, const char *filename,
struct stat statbuf;
int status;
struct stat statbuf;
int status;
- s
s
nprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, filename);
+ snprintf(abs_path, sizeof(abs_path), "%s/%s", dirname, filename);
status = lstat(abs_path, &statbuf);
if (status != 0) {
status = lstat(abs_path, &statbuf);
if (status != 0) {