From 815d752a972b1d67d09ae39611d77fab19eb1800 Mon Sep 17 00:00:00 2001 From: Benno Rice Date: Thu, 4 Jun 2009 23:31:05 +0000 Subject: [PATCH] style(9) pass prior to further changes. Sponsored by: Redacted Consulting --- sbin/kldload/kldload.c | 69 ++++++++++++++++++++++-------------------- 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/sbin/kldload/kldload.c b/sbin/kldload/kldload.c index 9e841bccf908..0f4bbbbf1ca0 100644 --- a/sbin/kldload/kldload.c +++ b/sbin/kldload/kldload.c @@ -27,55 +27,60 @@ #include __FBSDID("$FreeBSD$"); +#include +#include #include #include #include #include -#include -#include + +static void usage(void); static void usage(void) { - fprintf(stderr, "usage: kldload [-v] file ...\n"); - exit(1); + fprintf(stderr, "usage: kldload [-v] file ...\n"); + exit(1); } int main(int argc, char** argv) { - int c; - int errors; - int fileid; - int verbose; + int c; + int errors; + int fileid; + int verbose; - errors = 0; - verbose = 0; + errors = 0; + verbose = 0; - while ((c = getopt(argc, argv, "v")) != -1) - switch (c) { - case 'v': - verbose = 1; - break; - default: - usage(); + while ((c = getopt(argc, argv, "v")) != -1) { + switch (c) { + case 'v': + verbose = 1; + break; + default: + usage(); + } } - argc -= optind; - argv += optind; + argc -= optind; + argv += optind; - if (argc == 0) - usage(); + if (argc == 0) + usage(); - while (argc-- != 0) { - fileid = kldload(argv[0]); - if (fileid < 0) { - warn("can't load %s", argv[0]); - errors++; - } else - if (verbose) - printf("Loaded %s, id=%d\n", argv[0], fileid); - argv++; - } + while (argc-- != 0) { + fileid = kldload(argv[0]); + if (fileid < 0) { + warn("can't load %s", argv[0]); + errors++; + } else { + if (verbose) { + printf("Loaded %s, id=%d\n", argv[0], fileid); + } + } + argv++; + } - return errors ? 1 : 0; + return (errors ? 1 : 0); }