chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ask-password: modernizations
[elogind.git]
/
src
/
shared
/
cgroup-util.c
diff --git
a/src/shared/cgroup-util.c
b/src/shared/cgroup-util.c
index 1aa81c2cd18f1700a75631a4d6b9b1659dba3e9b..9d50890adc22047cfae1db4cb957a68c5b663d22 100644
(file)
--- a/
src/shared/cgroup-util.c
+++ b/
src/shared/cgroup-util.c
@@
-509,7
+509,7
@@
static int check_hierarchy(const char *p) {
assert(p);
/* Check if this controller actually really exists */
assert(p);
/* Check if this controller actually really exists */
- cc = alloca(s
izeof("/sys/fs/cgroup/") + strlen(p)
);
+ cc = alloca(s
trlen("/sys/fs/cgroup/") + strlen(p) + 1
);
strcpy(stpcpy(cc, "/sys/fs/cgroup/"), p);
if (access(cc, F_OK) < 0)
return -errno;
strcpy(stpcpy(cc, "/sys/fs/cgroup/"), p);
if (access(cc, F_OK) < 0)
return -errno;
@@
-1041,7
+1041,7
@@
int cg_mangle_path(const char *path, char **result) {
assert(path);
assert(result);
assert(path);
assert(result);
- /* First check if it already is a filesystem path */
+ /* First
,
check if it already is a filesystem path */
if (path_startswith(path, "/sys/fs/cgroup")) {
t = strdup(path);
if (path_startswith(path, "/sys/fs/cgroup")) {
t = strdup(path);
@@
-1053,7
+1053,7
@@
int cg_mangle_path(const char *path, char **result) {
return 0;
}
return 0;
}
- /* Otherwise treat it as cg spec */
+ /* Otherwise
,
treat it as cg spec */
r = cg_split_spec(path, &c, &p);
if (r < 0)
return r;
r = cg_split_spec(path, &c, &p);
if (r < 0)
return r;