summaryrefslogtreecommitdiffstats
path: root/schedutils/ionice.c
diff options
context:
space:
mode:
authorSami Kerola2011-07-21 17:09:28 +0200
committerKarel Zak2011-07-21 17:09:28 +0200
commita5e9b75fac965883515d94fdd0451868d240d9c9 (patch)
tree8afe9a1398a8c4a52dfc5fff996e9862be0444fd /schedutils/ionice.c
parentionice: fix -V output (diff)
downloadkernel-qcow2-util-linux-a5e9b75fac965883515d94fdd0451868d240d9c9.tar.gz
kernel-qcow2-util-linux-a5e9b75fac965883515d94fdd0451868d240d9c9.tar.xz
kernel-qcow2-util-linux-a5e9b75fac965883515d94fdd0451868d240d9c9.zip
ionice: coding style fixes
Signed-off-by: Sami Kerola <kerolasa@iki.fi> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'schedutils/ionice.c')
-rw-r--r--schedutils/ionice.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/schedutils/ionice.c b/schedutils/ionice.c
index e300ebc21..7c6897f08 100644
--- a/schedutils/ionice.c
+++ b/schedutils/ionice.c
@@ -106,7 +106,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out)
exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
}
-int main(int argc, char *argv[])
+int main(int argc, char **argv)
{
int data = 4, set = 0, ioclass = IOPRIO_CLASS_BE, c;
pid_t pid = 0;
@@ -125,7 +125,7 @@ int main(int argc, char *argv[])
bindtextdomain(PACKAGE, LOCALEDIR);
textdomain(PACKAGE);
- while ((c = getopt_long(argc, argv, "+n:c:p:tVh", longopts, NULL)) != EOF) {
+ while ((c = getopt_long(argc, argv, "+n:c:p:tVh", longopts, NULL)) != EOF)
switch (c) {
case 'n':
data = strtol_or_err(optarg, _("failed to parse class data"));
@@ -144,13 +144,12 @@ int main(int argc, char *argv[])
case 'V':
printf(_("%s from %s\n"),
program_invocation_short_name, PACKAGE_STRING);
- exit(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
case 'h':
usage(stdout);
default:
usage(stderr);
}
- }
if (!set && !pid && optind == argc)
errx(EXIT_FAILURE, _("PID or COMMAND not specified"));
@@ -198,5 +197,5 @@ int main(int argc, char *argv[])
}
}
- exit(EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}