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
a8da6388
Unverified
Commit
a8da6388
authored
Feb 24, 2021
by
Christian Brauner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands: ensure that non-NULL and MAX_STATE is always passed
Signed-off-by:
Christian Brauner
<
christian.brauner@ubuntu.com
>
parent
8b1e889b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
commands.c
src/lxc/commands.c
+1
-1
commands.h
src/lxc/commands.h
+4
-2
compiler.h
src/lxc/compiler.h
+4
-0
No files found.
src/lxc/commands.c
View file @
a8da6388
...
...
@@ -1280,7 +1280,7 @@ static int lxc_cmd_get_lxcpath_callback(int fd, struct lxc_cmd_req *req,
}
int
lxc_cmd_add_state_client
(
const
char
*
name
,
const
char
*
lxcpath
,
lxc_state_t
states
[
MAX_STATE
],
lxc_state_t
states
[
static
MAX_STATE
],
int
*
state_client_fd
)
{
__do_close
int
clientfd
=
-
EBADF
;
...
...
src/lxc/commands.h
View file @
a8da6388
...
...
@@ -112,8 +112,10 @@ __hidden extern int lxc_cmd_stop(const char *name, const char *lxcpath);
* via socket fd
* < MAX_STATE current container state
*/
__hidden
extern
int
lxc_cmd_add_state_client
(
const
char
*
name
,
const
char
*
lxcpath
,
lxc_state_t
states
[
MAX_STATE
],
int
*
state_client_fd
);
__hidden
__access_r_nosize
(
3
)
extern
int
lxc_cmd_add_state_client
(
const
char
*
name
,
const
char
*
lxcpath
,
lxc_state_t
states
[
static
MAX_STATE
],
int
*
state_client_fd
);
__hidden
extern
int
lxc_cmd_serve_state_clients
(
const
char
*
name
,
const
char
*
lxcpath
,
lxc_state_t
state
);
...
...
src/lxc/compiler.h
View file @
a8da6388
...
...
@@ -60,6 +60,7 @@
#define __cgfsng_ops
/* access attribute */
#define __access_r_nosize(x)
#define __access_r(x, y)
#define __access_w(x, y)
#define __access_rw(x, y)
...
...
@@ -69,6 +70,9 @@
#undef __access_r
#define __access_r(x, y) __attribute__((access(read_only, x, y)))
#undef __access_r_nosize
#define __access_r_nosize(x) __attribute__((access(read_only, x)))
#undef __access_w
#define __access_w(x, y) __attribute__((access(write_only, x, y)))
...
...
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