skill: Simplify the kill_main() loop.
Right now the "loop=0; break;" is never reached.
This commit is contained in:
parent
daec51a06c
commit
7d6977b6f7
6
skill.c
6
skill.c
@ -419,7 +419,6 @@ static void __attribute__ ((__noreturn__))
|
|||||||
kill_main(int argc, char **argv)
|
kill_main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
int signo, i;
|
int signo, i;
|
||||||
int loop = 1;
|
|
||||||
long pid;
|
long pid;
|
||||||
int exitvalue = EXIT_SUCCESS;
|
int exitvalue = EXIT_SUCCESS;
|
||||||
char *sig_option;
|
char *sig_option;
|
||||||
@ -446,7 +445,7 @@ static void __attribute__ ((__noreturn__))
|
|||||||
signo = SIGTERM;
|
signo = SIGTERM;
|
||||||
|
|
||||||
opterr=0; /* suppress errors on -123 */
|
opterr=0; /* suppress errors on -123 */
|
||||||
while (loop == 1 && (i = getopt_long(argc, argv, "l::Ls:hV", longopts, NULL)) != -1)
|
while ((i = getopt_long(argc, argv, "l::Ls:hV", longopts, NULL)) != -1)
|
||||||
switch (i) {
|
switch (i) {
|
||||||
case 'l':
|
case 'l':
|
||||||
sig_option = NULL;
|
sig_option = NULL;
|
||||||
@ -491,8 +490,7 @@ static void __attribute__ ((__noreturn__))
|
|||||||
exitvalue = EXIT_FAILURE;
|
exitvalue = EXIT_FAILURE;
|
||||||
exit(exitvalue);
|
exit(exitvalue);
|
||||||
}
|
}
|
||||||
loop=0;
|
xerrx(EXIT_FAILURE, _("internal error"));
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
kill_usage(stderr);
|
kill_usage(stderr);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user