]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - text-utils/colcrt.c
misc: cosmetics, remove argument from usage(FILE*)
[thirdparty/util-linux.git] / text-utils / colcrt.c
index ff8cd46944ed980c91736dc7f00e656cfe33974c..375d0d6f0c826da641edab4ef893744178a15cc1 100644 (file)
@@ -75,8 +75,9 @@ struct colcrt_control {
                        half_lines:1;
 };
 
-static void __attribute__((__noreturn__)) usage(FILE *out)
+static void __attribute__((__noreturn__)) usage(void)
 {
+       FILE *out = stdout;
        fputs(USAGE_HEADER, out);
        fprintf(out, _(" %s [options] [<file>...]\n"), program_invocation_short_name);
 
@@ -93,7 +94,7 @@ static void __attribute__((__noreturn__)) usage(FILE *out)
 
        fprintf(out, USAGE_MAN_TAIL("colcrt(1)"));
 
-       exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
+       exit(EXIT_SUCCESS);
 }
 
 static void trim_trailing_spaces(wchar_t *s)
@@ -264,7 +265,7 @@ int main(int argc, char **argv)
                        printf(UTIL_LINUX_VERSION);
                        return EXIT_SUCCESS;
                case 'h':
-                       usage(stdout);
+                       usage();
                default:
                        errtryhelp(EXIT_FAILURE);
                }