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
54d47131
Commit
54d47131
authored
Jul 01, 2018
by
2xsec
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: lxc-autostart: remove the trailing . & fix coding style of strncmp
Signed-off-by:
2xsec
<
dh48.jeong@samsung.com
>
parent
03e6adc6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
lxc_autostart.c
src/lxc/tools/lxc_autostart.c
+4
-7
No files found.
src/lxc/tools/lxc_autostart.c
View file @
54d47131
...
@@ -111,17 +111,14 @@ static int list_contains_entry(char *str_ptr, struct lxc_list *p1) {
...
@@ -111,17 +111,14 @@ static int list_contains_entry(char *str_ptr, struct lxc_list *p1) {
* If the entry is NULL or the empty string and the list
* If the entry is NULL or the empty string and the list
* is NULL, we have a match
* is NULL, we have a match
*/
*/
if
(
!
p1
&&
!
str_ptr
)
if
(
!
p1
&&
(
!
str_ptr
||
!*
str_ptr
))
return
1
;
if
(
!
p1
&&
!
(
*
str_ptr
))
return
1
;
return
1
;
if
(
!
p1
)
if
(
!
p1
)
return
0
;
return
0
;
lxc_list_for_each
(
it1
,
p1
)
{
lxc_list_for_each
(
it1
,
p1
)
{
if
(
!
strncmp
(
it1
->
elem
,
str_ptr
,
strlen
(
it1
->
elem
))
)
if
(
strncmp
(
it1
->
elem
,
str_ptr
,
strlen
(
it1
->
elem
))
==
0
)
return
1
;
return
1
;
}
}
...
@@ -361,7 +358,7 @@ int main(int argc, char *argv[])
...
@@ -361,7 +358,7 @@ int main(int argc, char *argv[])
qsort
(
&
containers
[
0
],
count
,
sizeof
(
struct
lxc_container
*
),
cmporder
);
qsort
(
&
containers
[
0
],
count
,
sizeof
(
struct
lxc_container
*
),
cmporder
);
if
(
cmd_groups_list
&&
my_args
.
all
)
if
(
cmd_groups_list
&&
my_args
.
all
)
ERROR
(
"Specifying -a (all) with -g (groups) doesn't make sense. All option overrides
.
"
);
ERROR
(
"Specifying -a (all) with -g (groups) doesn't make sense. All option overrides"
);
/* We need a default cmd_groups_list even for the -a
/* We need a default cmd_groups_list even for the -a
* case in order to force a pass through the loop for
* case in order to force a pass through the loop for
...
@@ -391,7 +388,7 @@ int main(int argc, char *argv[])
...
@@ -391,7 +388,7 @@ int main(int argc, char *argv[])
*/
*/
if
(
!
c
->
may_control
(
c
))
{
if
(
!
c
->
may_control
(
c
))
{
/* We're done with this container */
/* We're done with this container */
if
(
lxc_container_put
(
c
)
>
0
)
if
(
lxc_container_put
(
c
)
>
0
)
containers
[
i
]
=
NULL
;
containers
[
i
]
=
NULL
;
continue
;
continue
;
...
...
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