mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-27 15:05:17 +00:00
LXC: Delete unused variable src in lxcContainerMountBasicFS
There is no code use the variable "src" in lxcContainerMountBasicFS. so delete it and VIR_FREE. Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
This commit is contained in:
parent
2d98c68662
commit
a80bb970fc
@ -456,7 +456,6 @@ static int lxcContainerMountBasicFS(virDomainDefPtr def,
|
|||||||
VIR_DEBUG("Mounting basic filesystems pivotRoot=%d", pivotRoot);
|
VIR_DEBUG("Mounting basic filesystems pivotRoot=%d", pivotRoot);
|
||||||
|
|
||||||
for (i = 0 ; i < ARRAY_CARDINALITY(mnts) ; i++) {
|
for (i = 0 ; i < ARRAY_CARDINALITY(mnts) ; i++) {
|
||||||
char *src = NULL;
|
|
||||||
const char *srcpath = NULL;
|
const char *srcpath = NULL;
|
||||||
|
|
||||||
VIR_DEBUG("Processing %s -> %s",
|
VIR_DEBUG("Processing %s -> %s",
|
||||||
@ -473,21 +472,17 @@ static int lxcContainerMountBasicFS(virDomainDefPtr def,
|
|||||||
|
|
||||||
/* Skip if mount doesn't exist in source */
|
/* Skip if mount doesn't exist in source */
|
||||||
if ((srcpath[0] == '/') &&
|
if ((srcpath[0] == '/') &&
|
||||||
(access(srcpath, R_OK) < 0)) {
|
(access(srcpath, R_OK) < 0))
|
||||||
VIR_FREE(src);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
|
||||||
|
|
||||||
VIR_DEBUG("Mount %s on %s type=%s flags=%x, opts=%s",
|
VIR_DEBUG("Mount %s on %s type=%s flags=%x, opts=%s",
|
||||||
srcpath, mnts[i].dst, mnts[i].type, mnts[i].mflags, mnts[i].opts);
|
srcpath, mnts[i].dst, mnts[i].type, mnts[i].mflags, mnts[i].opts);
|
||||||
if (mount(srcpath, mnts[i].dst, mnts[i].type, mnts[i].mflags, mnts[i].opts) < 0) {
|
if (mount(srcpath, mnts[i].dst, mnts[i].type, mnts[i].mflags, mnts[i].opts) < 0) {
|
||||||
VIR_FREE(src);
|
|
||||||
virReportSystemError(errno,
|
virReportSystemError(errno,
|
||||||
_("Failed to mount %s on %s type %s"),
|
_("Failed to mount %s on %s type %s"),
|
||||||
mnts[i].src, mnts[i].dst, NULLSTR(mnts[i].type));
|
mnts[i].src, mnts[i].dst, NULLSTR(mnts[i].type));
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
VIR_FREE(src);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pivotRoot) {
|
if (pivotRoot) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user