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
4a7c7daa
Commit
4a7c7daa
authored
Sep 04, 2012
by
Serge Hallyn
Committed by
Stéphane Graber
Nov 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix passing non-const char* in for const char*
Signed-off-by:
Serge Hallyn
<
serge.hallyn@ubuntu.com
>
parent
c278cef2
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
5 deletions
+5
-5
lxc.h
src/lxc/lxc.h
+1
-1
lxc_wait.c
src/lxc/lxc_wait.c
+1
-1
lxccontainer.c
src/lxc/lxccontainer.c
+1
-1
lxccontainer.h
src/lxc/lxccontainer.h
+1
-1
containertests.c
src/tests/containertests.c
+1
-1
No files found.
src/lxc/lxc.h
View file @
4a7c7daa
...
@@ -201,7 +201,7 @@ extern int lxc_container_put(struct lxc_container *c);
...
@@ -201,7 +201,7 @@ extern int lxc_container_put(struct lxc_container *c);
* Get a list of valid wait states.
* Get a list of valid wait states.
* If states is NULL, simply return the number of states
* If states is NULL, simply return the number of states
*/
*/
extern
int
lxc_get_wait_states
(
char
**
states
);
extern
int
lxc_get_wait_states
(
c
onst
c
har
**
states
);
#ifdef __cplusplus
#ifdef __cplusplus
}
}
...
...
src/lxc/lxc_wait.c
View file @
4a7c7daa
...
@@ -87,5 +87,5 @@ int main(int argc, char *argv[])
...
@@ -87,5 +87,5 @@ int main(int argc, char *argv[])
my_args
.
progname
,
my_args
.
quiet
))
my_args
.
progname
,
my_args
.
quiet
))
return
-
1
;
return
-
1
;
return
lxc_wait
(
my_args
.
name
,
my_args
.
states
,
my_args
.
timeout
);
return
lxc_wait
(
strdup
(
my_args
.
name
)
,
my_args
.
states
,
my_args
.
timeout
);
}
}
src/lxc/lxccontainer.c
View file @
4a7c7daa
...
@@ -906,7 +906,7 @@ err:
...
@@ -906,7 +906,7 @@ err:
return
NULL
;
return
NULL
;
}
}
int
lxc_get_wait_states
(
char
**
states
)
int
lxc_get_wait_states
(
c
onst
c
har
**
states
)
{
{
int
i
;
int
i
;
...
...
src/lxc/lxccontainer.h
View file @
4a7c7daa
...
@@ -63,7 +63,7 @@ struct lxc_container {
...
@@ -63,7 +63,7 @@ struct lxc_container {
struct
lxc_container
*
lxc_container_new
(
char
*
name
);
struct
lxc_container
*
lxc_container_new
(
char
*
name
);
int
lxc_container_get
(
struct
lxc_container
*
c
);
int
lxc_container_get
(
struct
lxc_container
*
c
);
int
lxc_container_put
(
struct
lxc_container
*
c
);
int
lxc_container_put
(
struct
lxc_container
*
c
);
int
lxc_get_wait_states
(
char
**
states
);
int
lxc_get_wait_states
(
c
onst
c
har
**
states
);
#if 0
#if 0
char ** lxc_get_valid_keys();
char ** lxc_get_valid_keys();
...
...
src/tests/containertests.c
View file @
4a7c7daa
...
@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
...
@@ -210,7 +210,7 @@ int main(int argc, char *argv[])
fprintf
(
stderr
,
"%d: lxc_get_wait_states gave %d not %d
\n
"
,
__LINE__
,
numstates
,
MAX_STATE
);
fprintf
(
stderr
,
"%d: lxc_get_wait_states gave %d not %d
\n
"
,
__LINE__
,
numstates
,
MAX_STATE
);
goto
out
;
goto
out
;
}
}
c
har
**
sstr
=
malloc
(
numstates
*
sizeof
(
char
*
));
c
onst
char
**
sstr
=
malloc
(
numstates
*
sizeof
(
const
char
*
));
numstates
=
lxc_get_wait_states
(
sstr
);
numstates
=
lxc_get_wait_states
(
sstr
);
int
i
;
int
i
;
for
(
i
=
0
;
i
<
numstates
;
i
++
)
{
for
(
i
=
0
;
i
<
numstates
;
i
++
)
{
...
...
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