mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-31 00:45:18 +00:00
lxc: virLXCControllerAddConsole() to void
virLXCControllerAddConsole() return value is invariant, so change it type and remove all dependent checks. Signed-off-by: Artem Chernyshev <artem.chernyshev@red-soft.ru> Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
bce48d99a7
commit
270e363046
@ -313,8 +313,8 @@ static void virLXCControllerFree(virLXCController *ctrl)
|
||||
}
|
||||
|
||||
|
||||
static int virLXCControllerAddConsole(virLXCController *ctrl,
|
||||
int hostFd)
|
||||
static void virLXCControllerAddConsole(virLXCController *ctrl,
|
||||
int hostFd)
|
||||
{
|
||||
VIR_EXPAND_N(ctrl->consoles, ctrl->nconsoles, 1);
|
||||
ctrl->consoles[ctrl->nconsoles-1].daemon = ctrl->daemon;
|
||||
@ -326,7 +326,6 @@ static int virLXCControllerAddConsole(virLXCController *ctrl,
|
||||
|
||||
ctrl->consoles[ctrl->nconsoles-1].epollFd = -1;
|
||||
ctrl->consoles[ctrl->nconsoles-1].epollWatch = -1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@ -2655,8 +2654,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
|
||||
for (i = 0; i < nttyFDs; i++) {
|
||||
if (virLXCControllerAddConsole(ctrl, ttyFDs[i]) < 0)
|
||||
goto cleanup;
|
||||
virLXCControllerAddConsole(ctrl, ttyFDs[i]);
|
||||
ttyFDs[i] = -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user