From 86be6a32d3fd229dbb17bf5e3348a01e6e6e855a Mon Sep 17 00:00:00 2001 From: Ruediger Meier Date: Tue, 20 Jun 2017 20:20:29 +0200 Subject: misc: cosmetics, remove argument from usage(FILE*) This patch is trivial and changes nothing, because we were always using usage(stdout) Now all our usage() functions look very similar. If wanted we could auto-generate another big cosmetical patch to remove all the useless "FILE *out" constants and use printf and puts rather than their f* friends. Such patch could be automatically synchronized with the translation project (newlines!) to not make the translators sick. Signed-off-by: Ruediger Meier --- text-utils/colrm.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'text-utils/colrm.c') diff --git a/text-utils/colrm.c b/text-utils/colrm.c index b2816cd07..ebebca0bf 100644 --- a/text-utils/colrm.c +++ b/text-utils/colrm.c @@ -54,8 +54,9 @@ COLRM removes unwanted columns from a file Jeff Schriebman UC Berkeley 11-74 */ -static void __attribute__ ((__noreturn__)) usage(FILE * out) +static void __attribute__((__noreturn__)) usage(void) { + FILE *out = stdout; fprintf(out, _("\nUsage:\n" " %s [startcol [endcol]]\n"), program_invocation_short_name); @@ -69,7 +70,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) fprintf(out, _("%s reads from standard input and writes to standard output\n\n"), program_invocation_short_name); fprintf(out, USAGE_MAN_TAIL("colrm(1)")); - exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); + exit(EXIT_SUCCESS); } static int process_input(unsigned long first, unsigned long last) @@ -176,7 +177,7 @@ int main(int argc, char **argv) printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; case 'h': - usage(stdout); + usage(); default: errtryhelp(EXIT_FAILURE); } -- cgit v1.2.3-55-g7522