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
aa4376ad
Unverified
Commit
aa4376ad
authored
Mar 04, 2019
by
tomponline
Committed by
Christian Brauner
Apr 10, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lxccontainer: shut up gcc and remove unused variables.
Closes #2885. Signed-off-by:
tomponline
<
tomp@tomp.uk
>
parent
32dad1cd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
lxccontainer.c
src/lxc/lxccontainer.c
+9
-10
No files found.
src/lxc/lxccontainer.c
View file @
aa4376ad
...
@@ -118,7 +118,7 @@ static bool do_lxcapi_save_config(struct lxc_container *c, const char *alt_file)
...
@@ -118,7 +118,7 @@ static bool do_lxcapi_save_config(struct lxc_container *c, const char *alt_file)
static
bool
config_file_exists
(
const
char
*
lxcpath
,
const
char
*
cname
)
static
bool
config_file_exists
(
const
char
*
lxcpath
,
const
char
*
cname
)
{
{
__do_free
char
*
fname
;
__do_free
char
*
fname
=
NULL
;
int
ret
;
int
ret
;
size_t
len
;
size_t
len
;
...
@@ -142,7 +142,7 @@ static bool config_file_exists(const char *lxcpath, const char *cname)
...
@@ -142,7 +142,7 @@ static bool config_file_exists(const char *lxcpath, const char *cname)
*/
*/
static
int
ongoing_create
(
struct
lxc_container
*
c
)
static
int
ongoing_create
(
struct
lxc_container
*
c
)
{
{
__do_free
char
*
path
;
__do_free
char
*
path
=
NULL
;
int
fd
,
ret
;
int
fd
,
ret
;
size_t
len
;
size_t
len
;
struct
flock
lk
=
{
0
};
struct
flock
lk
=
{
0
};
...
@@ -188,7 +188,7 @@ static int ongoing_create(struct lxc_container *c)
...
@@ -188,7 +188,7 @@ static int ongoing_create(struct lxc_container *c)
static
int
create_partial
(
struct
lxc_container
*
c
)
static
int
create_partial
(
struct
lxc_container
*
c
)
{
{
__do_free
char
*
path
;
__do_free
char
*
path
=
NULL
;
int
fd
,
ret
;
int
fd
,
ret
;
size_t
len
;
size_t
len
;
struct
flock
lk
=
{
0
};
struct
flock
lk
=
{
0
};
...
@@ -225,7 +225,7 @@ static int create_partial(struct lxc_container *c)
...
@@ -225,7 +225,7 @@ static int create_partial(struct lxc_container *c)
static
void
remove_partial
(
struct
lxc_container
*
c
,
int
fd
)
static
void
remove_partial
(
struct
lxc_container
*
c
,
int
fd
)
{
{
__do_free
char
*
path
;
__do_free
char
*
path
=
NULL
;
int
ret
;
int
ret
;
size_t
len
;
size_t
len
;
...
@@ -1184,7 +1184,6 @@ static int do_create_container_dir(const char *path, struct lxc_conf *conf)
...
@@ -1184,7 +1184,6 @@ static int do_create_container_dir(const char *path, struct lxc_conf *conf)
{
{
__do_free
char
*
p
=
NULL
;
__do_free
char
*
p
=
NULL
;
int
lasterr
;
int
lasterr
;
size_t
len
;
int
ret
=
-
1
;
int
ret
=
-
1
;
mode_t
mask
=
umask
(
0002
);
mode_t
mask
=
umask
(
0002
);
...
@@ -1241,7 +1240,7 @@ static struct lxc_storage *do_storage_create(struct lxc_container *c,
...
@@ -1241,7 +1240,7 @@ static struct lxc_storage *do_storage_create(struct lxc_container *c,
const
char
*
type
,
const
char
*
type
,
struct
bdev_specs
*
specs
)
struct
bdev_specs
*
specs
)
{
{
__do_free
char
*
dest
;
__do_free
char
*
dest
=
NULL
;
int
ret
;
int
ret
;
size_t
len
;
size_t
len
;
struct
lxc_storage
*
bdev
;
struct
lxc_storage
*
bdev
;
...
@@ -3358,7 +3357,7 @@ err:
...
@@ -3358,7 +3357,7 @@ err:
static
int
copyhooks
(
struct
lxc_container
*
oldc
,
struct
lxc_container
*
c
)
static
int
copyhooks
(
struct
lxc_container
*
oldc
,
struct
lxc_container
*
c
)
{
{
__do_free
char
*
cpath
;
__do_free
char
*
cpath
=
NULL
;
int
i
,
len
,
ret
;
int
i
,
len
,
ret
;
struct
lxc_list
*
it
;
struct
lxc_list
*
it
;
...
@@ -3521,7 +3520,7 @@ static bool add_rdepends(struct lxc_container *c, struct lxc_container *c0)
...
@@ -3521,7 +3520,7 @@ static bool add_rdepends(struct lxc_container *c, struct lxc_container *c0)
bool
should_default_to_snapshot
(
struct
lxc_container
*
c0
,
bool
should_default_to_snapshot
(
struct
lxc_container
*
c0
,
struct
lxc_container
*
c1
)
struct
lxc_container
*
c1
)
{
{
__do_free
char
*
p0
,
*
p1
;
__do_free
char
*
p0
=
NULL
,
*
p1
=
NULL
;
int
ret
;
int
ret
;
size_t
l0
=
strlen
(
c0
->
config_path
)
+
strlen
(
c0
->
name
)
+
2
;
size_t
l0
=
strlen
(
c0
->
config_path
)
+
strlen
(
c0
->
name
)
+
2
;
size_t
l1
=
strlen
(
c1
->
config_path
)
+
strlen
(
c1
->
name
)
+
2
;
size_t
l1
=
strlen
(
c1
->
config_path
)
+
strlen
(
c1
->
name
)
+
2
;
...
@@ -4051,7 +4050,7 @@ static int lxcapi_attach_run_wait(struct lxc_container *c, lxc_attach_options_t
...
@@ -4051,7 +4050,7 @@ static int lxcapi_attach_run_wait(struct lxc_container *c, lxc_attach_options_t
static
int
get_next_index
(
const
char
*
lxcpath
,
char
*
cname
)
static
int
get_next_index
(
const
char
*
lxcpath
,
char
*
cname
)
{
{
__do_free
char
*
fname
;
__do_free
char
*
fname
=
NULL
;
struct
stat
sb
;
struct
stat
sb
;
int
i
=
0
,
ret
;
int
i
=
0
,
ret
;
...
@@ -4186,7 +4185,7 @@ static int do_lxcapi_snapshot(struct lxc_container *c, const char *commentfile)
...
@@ -4186,7 +4185,7 @@ static int do_lxcapi_snapshot(struct lxc_container *c, const char *commentfile)
}
}
if
(
commentfile
)
{
if
(
commentfile
)
{
__do_free
char
*
path
;
__do_free
char
*
path
=
NULL
;
/* $p / $name / comment \0 */
/* $p / $name / comment \0 */
int
len
=
strlen
(
snappath
)
+
strlen
(
newname
)
+
10
;
int
len
=
strlen
(
snappath
)
+
strlen
(
newname
)
+
10
;
...
...
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