virLXCControllerAddConsole() return value is invariant, so change it type and remove all dependent checks. Fixes: 7d2fd6ef01 ("Do not check return value of VIR_EXPAND_N") Signed-off-by: Artem Chernyshev <artem.chernyshev@xxxxxxxxxxx> --- src/lxc/lxc_controller.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/lxc/lxc_controller.c b/src/lxc/lxc_controller.c index 0a92a24fb7..f809aea6d0 100644 --- a/src/lxc/lxc_controller.c +++ b/src/lxc/lxc_controller.c @@ -313,7 +313,7 @@ static void virLXCControllerFree(virLXCController *ctrl) } -static int virLXCControllerAddConsole(virLXCController *ctrl, +static void virLXCControllerAddConsole(virLXCController *ctrl, int hostFd) { VIR_EXPAND_N(ctrl->consoles, ctrl->nconsoles, 1); @@ -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; } -- 2.43.0 _______________________________________________ Devel mailing list -- devel@xxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx