From f0bf1343b07784e805af9bbc87ea392b8517288e Mon Sep 17 00:00:00 2001 From: Joachim Wiberg Date: Wed, 7 Apr 2021 13:57:43 +0200 Subject: [PATCH] initctl: skip return value for uev_*_init(), optional We have these neat extras for added value, if they should fail, for whatever reason, we still want to present 'top' to the user, which may have to use 'reset' if exited improperly and lost cooked/cursor. Signed-off-by: Joachim Wiberg --- src/cgutil.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cgutil.c b/src/cgutil.c index 2806c05d..ca97028d 100644 --- a/src/cgutil.c +++ b/src/cgutil.c @@ -617,11 +617,11 @@ int show_cgtop(char *arg) flags = fcntl(STDIN_FILENO, F_GETFL); if (flags != -1) (void)fcntl(STDIN_FILENO, F_SETFL, flags | O_NONBLOCK); - uev_io_init(&ctx, &input, key, NULL, STDIN_FILENO, UEV_READ); + (void)uev_io_init(&ctx, &input, key, NULL, STDIN_FILENO, UEV_READ); - uev_signal_init(&ctx, &sigint, leave, NULL, SIGINT); - uev_signal_init(&ctx, &sigterm, leave, NULL, SIGTERM); - uev_signal_init(&ctx, &sigquit, leave, NULL, SIGQUIT); + (void)uev_signal_init(&ctx, &sigint, leave, NULL, SIGINT); + (void)uev_signal_init(&ctx, &sigterm, leave, NULL, SIGTERM); + (void)uev_signal_init(&ctx, &sigquit, leave, NULL, SIGQUIT); } return uev_run(&ctx, 0);