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
6219606b
Unverified
Commit
6219606b
authored
Mar 27, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
conf: coding style cleanups
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
5c1a9b8a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
conf.c
src/lxc/conf.c
+7
-10
No files found.
src/lxc/conf.c
View file @
6219606b
...
@@ -3674,11 +3674,9 @@ int lxc_clear_config_keepcaps(struct lxc_conf *c)
...
@@ -3674,11 +3674,9 @@ int lxc_clear_config_keepcaps(struct lxc_conf *c)
int
lxc_clear_namespace
(
struct
lxc_conf
*
c
)
int
lxc_clear_namespace
(
struct
lxc_conf
*
c
)
{
{
int
i
;
for
(
int
i
=
0
;
i
<
LXC_NS_MAX
;
i
++
)
for
(
i
=
0
;
i
<
LXC_NS_MAX
;
i
++
)
{
free_disarm
(
c
->
ns_share
[
i
]);
free
(
c
->
ns_share
[
i
]);
c
->
ns_share
[
i
]
=
NULL
;
}
return
0
;
return
0
;
}
}
...
@@ -3711,7 +3709,7 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version)
...
@@ -3711,7 +3709,7 @@ int lxc_clear_cgroups(struct lxc_conf *c, const char *key, int version)
else
else
return
ret_errno
(
EINVAL
);
return
ret_errno
(
EINVAL
);
lxc_list_for_each_safe
(
it
,
list
,
next
)
{
lxc_list_for_each_safe
(
it
,
list
,
next
)
{
struct
lxc_cgroup
*
cg
=
it
->
elem
;
struct
lxc_cgroup
*
cg
=
it
->
elem
;
if
(
!
all
&&
!
strequal
(
cg
->
subsystem
,
k
))
if
(
!
all
&&
!
strequal
(
cg
->
subsystem
,
k
))
...
@@ -3814,7 +3812,7 @@ int lxc_clear_procs(struct lxc_conf *c, const char *key)
...
@@ -3814,7 +3812,7 @@ int lxc_clear_procs(struct lxc_conf *c, const char *key)
else
else
return
-
1
;
return
-
1
;
lxc_list_for_each_safe
(
it
,
&
c
->
procs
,
next
)
{
lxc_list_for_each_safe
(
it
,
&
c
->
procs
,
next
)
{
struct
lxc_proc
*
proc
=
it
->
elem
;
struct
lxc_proc
*
proc
=
it
->
elem
;
if
(
!
all
&&
!
strequal
(
proc
->
filename
,
k
))
if
(
!
all
&&
!
strequal
(
proc
->
filename
,
k
))
...
@@ -3883,7 +3881,6 @@ int lxc_clear_automounts(struct lxc_conf *c)
...
@@ -3883,7 +3881,6 @@ int lxc_clear_automounts(struct lxc_conf *c)
int
lxc_clear_hooks
(
struct
lxc_conf
*
c
,
const
char
*
key
)
int
lxc_clear_hooks
(
struct
lxc_conf
*
c
,
const
char
*
key
)
{
{
int
i
;
struct
lxc_list
*
it
,
*
next
;
struct
lxc_list
*
it
,
*
next
;
const
char
*
k
=
NULL
;
const
char
*
k
=
NULL
;
bool
all
=
false
,
done
=
false
;
bool
all
=
false
,
done
=
false
;
...
@@ -3895,7 +3892,7 @@ int lxc_clear_hooks(struct lxc_conf *c, const char *key)
...
@@ -3895,7 +3892,7 @@ int lxc_clear_hooks(struct lxc_conf *c, const char *key)
else
else
return
-
1
;
return
-
1
;
for
(
i
=
0
;
i
<
NUM_LXC_HOOKS
;
i
++
)
{
for
(
i
nt
i
=
0
;
i
<
NUM_LXC_HOOKS
;
i
++
)
{
if
(
all
||
strequal
(
k
,
lxchook_names
[
i
]))
{
if
(
all
||
strequal
(
k
,
lxchook_names
[
i
]))
{
lxc_list_for_each_safe
(
it
,
&
c
->
hooks
[
i
],
next
)
{
lxc_list_for_each_safe
(
it
,
&
c
->
hooks
[
i
],
next
)
{
lxc_list_del
(
it
);
lxc_list_del
(
it
);
...
@@ -3931,7 +3928,7 @@ void lxc_clear_includes(struct lxc_conf *conf)
...
@@ -3931,7 +3928,7 @@ void lxc_clear_includes(struct lxc_conf *conf)
{
{
struct
lxc_list
*
it
,
*
next
;
struct
lxc_list
*
it
,
*
next
;
lxc_list_for_each_safe
(
it
,
&
conf
->
includes
,
next
)
{
lxc_list_for_each_safe
(
it
,
&
conf
->
includes
,
next
)
{
lxc_list_del
(
it
);
lxc_list_del
(
it
);
free
(
it
->
elem
);
free
(
it
->
elem
);
free
(
it
);
free
(
it
);
...
...
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