summaryrefslogtreecommitdiffstats
path: root/schedutils
diff options
context:
space:
mode:
Diffstat (limited to 'schedutils')
-rw-r--r--schedutils/chrt.c7
-rw-r--r--schedutils/ionice.c2
-rw-r--r--schedutils/taskset.c3
3 files changed, 4 insertions, 8 deletions
diff --git a/schedutils/chrt.c b/schedutils/chrt.c
index 73d1ffa9b..b52aec137 100644
--- a/schedutils/chrt.c
+++ b/schedutils/chrt.c
@@ -439,8 +439,6 @@ int main(int argc, char **argv)
while((c = getopt_long(argc, argv, "+abdD:fiphmoP:T:rRvV", longopts, NULL)) != -1)
{
- int ret = EXIT_FAILURE;
-
switch (c) {
case 'a':
ctl->all_tasks = 1;
@@ -496,10 +494,9 @@ int main(int argc, char **argv)
printf(UTIL_LINUX_VERSION);
return EXIT_SUCCESS;
case 'h':
- ret = EXIT_SUCCESS;
- /* fallthrough */
+ show_usage(EXIT_SUCCESS);
default:
- show_usage(ret);
+ errtryhelp(EXIT_FAILURE);
}
}
diff --git a/schedutils/ionice.c b/schedutils/ionice.c
index 5528afed5..38a6846f9 100644
--- a/schedutils/ionice.c
+++ b/schedutils/ionice.c
@@ -203,7 +203,7 @@ int main(int argc, char **argv)
case 'h':
usage(stdout);
default:
- usage(stderr);
+ errtryhelp(EXIT_FAILURE);
}
switch (ioclass) {
diff --git a/schedutils/taskset.c b/schedutils/taskset.c
index d6b21e45c..199d62566 100644
--- a/schedutils/taskset.c
+++ b/schedutils/taskset.c
@@ -172,8 +172,7 @@ int main(int argc, char **argv)
usage(stdout);
break;
default:
- usage(stderr);
- break;
+ errtryhelp(EXIT_FAILURE);
}
}