Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
3ebe2fbd
Unverified
Commit
3ebe2fbd
authored
Jun 21, 2018
by
Donghwa Jeong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgfsng: strncat => strlcat
Signed-off-by:
Donghwa Jeong
<
dh48.jeong@samsung.com
>
parent
2df5f6bf
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
cgfsng.c
src/lxc/cgroups/cgfsng.c
+8
-4
No files found.
src/lxc/cgroups/cgfsng.c
View file @
3ebe2fbd
...
@@ -62,6 +62,10 @@
...
@@ -62,6 +62,10 @@
#include "include/strlcpy.h"
#include "include/strlcpy.h"
#endif
#endif
#ifndef HAVE_STRLCAT
#include "include/strlcat.h"
#endif
lxc_log_define
(
lxc_cgfsng
,
lxc
);
lxc_log_define
(
lxc_cgfsng
,
lxc
);
static
void
free_string_list
(
char
**
clist
)
static
void
free_string_list
(
char
**
clist
)
...
@@ -1205,11 +1209,11 @@ static bool cg_unified_create_cgroup(struct hierarchy *h, char *cgname)
...
@@ -1205,11 +1209,11 @@ static bool cg_unified_create_cgroup(struct hierarchy *h, char *cgname)
if
(
h
->
controllers
[
0
]
==
*
it
)
if
(
h
->
controllers
[
0
]
==
*
it
)
add_controllers
[
0
]
=
'\0'
;
add_controllers
[
0
]
=
'\0'
;
strncat
(
add_controllers
,
"+"
,
1
);
(
void
)
strlcat
(
add_controllers
,
"+"
,
full_len
+
1
);
strncat
(
add_controllers
,
*
it
,
strlen
(
*
it
)
);
(
void
)
strlcat
(
add_controllers
,
*
it
,
full_len
+
1
);
if
((
it
+
1
)
&&
*
(
it
+
1
))
if
((
it
+
1
)
&&
*
(
it
+
1
))
strncat
(
add_controllers
,
" "
,
1
);
(
void
)
strlcat
(
add_controllers
,
" "
,
full_len
+
1
);
}
}
parts
=
lxc_string_split
(
cgname
,
'/'
);
parts
=
lxc_string_split
(
cgname
,
'/'
);
...
@@ -1951,7 +1955,7 @@ static int __cg_unified_attach(const struct hierarchy *h, const char *name,
...
@@ -1951,7 +1955,7 @@ static int __cg_unified_attach(const struct hierarchy *h, const char *name,
if
(
ret
<
0
&&
errno
!=
EEXIST
)
if
(
ret
<
0
&&
errno
!=
EEXIST
)
goto
on_error
;
goto
on_error
;
strncat
(
full_path
,
"/cgroup.procs"
,
strlen
(
"/cgroup.procs"
)
);
(
void
)
strlcat
(
full_path
,
"/cgroup.procs"
,
len
+
1
);
ret
=
lxc_write_to_file
(
full_path
,
pidstr
,
len
,
false
,
0666
);
ret
=
lxc_write_to_file
(
full_path
,
pidstr
,
len
,
false
,
0666
);
if
(
ret
==
0
)
if
(
ret
==
0
)
goto
on_success
;
goto
on_success
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment