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
06d390df
Unverified
Commit
06d390df
authored
Aug 21, 2018
by
Christian Brauner
Committed by
GitHub
Aug 21, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2552 from tcharding/cpp-check
cmd: Lint with cppcheck
parents
86cea5d1
aac44dc4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lxc_user_nic.c
src/lxc/cmd/lxc_user_nic.c
+5
-5
No files found.
src/lxc/cmd/lxc_user_nic.c
View file @
06d390df
...
...
@@ -707,7 +707,6 @@ static char *get_nic_if_avail(int fd, struct alloted_s *names, int pid,
char
nicname
[
IFNAMSIZ
];
struct
stat
sb
;
struct
alloted_s
*
n
;
int
count
=
0
;
char
*
buf
=
NULL
;
for
(
n
=
names
;
n
!=
NULL
;
n
=
n
->
next
)
...
...
@@ -735,6 +734,8 @@ static char *get_nic_if_avail(int fd, struct alloted_s *names, int pid,
owner
=
NULL
;
for
(
n
=
names
;
n
!=
NULL
;
n
=
n
->
next
)
{
int
count
;
count
=
count_entries
(
buf
,
sb
.
st_size
,
n
->
name
,
intype
,
br
);
if
(
count
>=
n
->
allowed
)
continue
;
...
...
@@ -862,12 +863,12 @@ again:
static
char
*
lxc_secure_rename_in_ns
(
int
pid
,
char
*
oldname
,
char
*
newname
,
int
*
container_veth_ifidx
)
{
int
ret
;
int
ofd
,
ret
;
pid_t
pid_self
;
uid_t
ruid
,
suid
,
euid
;
char
ifname
[
IFNAMSIZ
];
char
*
string_ret
=
NULL
,
*
name
=
NULL
;
int
fd
=
-
1
,
ifindex
=
-
1
,
ofd
=
-
1
;
int
fd
=
-
1
,
ifindex
=
-
1
;
pid_self
=
lxc_raw_getpid
();
...
...
@@ -1035,11 +1036,10 @@ struct user_nic_args {
static
bool
is_privileged_over_netns
(
int
netns_fd
)
{
int
ret
;
int
ofd
,
ret
;
pid_t
pid_self
;
uid_t
euid
,
ruid
,
suid
;
bool
bret
=
false
;
int
ofd
=
-
1
;
pid_self
=
lxc_raw_getpid
();
...
...
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