From c704460c7df4b84e68f065c58f11c5782a0d0b4b Mon Sep 17 00:00:00 2001 From: Qualys Security Advisory Date: Thu, 1 Jan 1970 00:00:00 +0000 Subject: [PATCH] 0022-skill: Simplify the kill_main() loop. Right now the "loop=0; break;" is never reached. --- kill.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/kill.c b/kill.c index ecace65b..6fa3a4cb 100644 --- a/kill.c +++ b/kill.c @@ -50,7 +50,7 @@ static void __attribute__ ((__noreturn__)) print_usage(FILE * out) int main(int argc, char **argv) { - int signo, i, loop=1; + int signo, i; long pid; int exitvalue = EXIT_SUCCESS; int optindex; @@ -79,7 +79,7 @@ int main(int argc, char **argv) signo = SIGTERM; opterr=0; /* suppress errors on -123 */ - while (loop == 1 && (i = getopt_long(argc, argv, "l::Ls:hV", longopts, &optindex)) != -1) + while ((i = getopt_long(argc, argv, "l::Ls:hV", longopts, &optindex)) != -1) switch (i) { case 'l': sig_option = NULL; @@ -124,8 +124,7 @@ int main(int argc, char **argv) exitvalue = EXIT_FAILURE; exit(exitvalue); } - loop=0; - break; + xerrx(EXIT_FAILURE, _("internal error")); default: print_usage(stderr); }