mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-08-15 15:01:57 +00:00
fix coverity-found errors.
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
This commit is contained in:
parent
00b6be440f
commit
4d44e274dc
@ -700,7 +700,8 @@ static int setup_tty(const struct lxc_rootfs *rootfs,
|
|||||||
SYSERROR("error creating %s\n", lxcpath);
|
SYSERROR("error creating %s\n", lxcpath);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
close(ret);
|
if (ret >= 0)
|
||||||
|
close(ret);
|
||||||
ret = unlink(path);
|
ret = unlink(path);
|
||||||
if (ret && errno != ENOENT) {
|
if (ret && errno != ENOENT) {
|
||||||
SYSERROR("error unlinking %s\n", path);
|
SYSERROR("error unlinking %s\n", path);
|
||||||
@ -1314,7 +1315,8 @@ static int setup_ttydir_console(const struct lxc_rootfs *rootfs,
|
|||||||
SYSERROR("error %d creating %s\n", errno, lxcpath);
|
SYSERROR("error %d creating %s\n", errno, lxcpath);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
close(ret);
|
if (ret >= 0)
|
||||||
|
close(ret);
|
||||||
|
|
||||||
if (console->peer == -1) {
|
if (console->peer == -1) {
|
||||||
INFO("no console output required");
|
INFO("no console output required");
|
||||||
|
@ -53,7 +53,7 @@ pid_t lxc_clone(int (*fn)(void *), void *arg, int flags)
|
|||||||
.arg = arg,
|
.arg = arg,
|
||||||
};
|
};
|
||||||
|
|
||||||
long stack_size = sysconf(_SC_PAGESIZE);
|
size_t stack_size = sysconf(_SC_PAGESIZE);
|
||||||
void *stack = alloca(stack_size);
|
void *stack = alloca(stack_size);
|
||||||
pid_t ret;
|
pid_t ret;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user