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 --- sys-utils/eject.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys-utils/eject.c') diff --git a/sys-utils/eject.c b/sys-utils/eject.c index 7cdd2db6e..296e5cba5 100644 --- a/sys-utils/eject.c +++ b/sys-utils/eject.c @@ -127,8 +127,9 @@ static inline void info(const char *fmt, ...) va_end(va); } -static void __attribute__ ((__noreturn__)) usage(FILE * out) +static void __attribute__((__noreturn__)) usage(void) { + FILE *out = stdout; fputs(USAGE_HEADER, out); fprintf(out, _(" %s [options] [|]\n"), program_invocation_short_name); @@ -164,7 +165,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) fputs(_("\nBy default tries -r, -s, -f, and -q in order until success.\n"), out); fprintf(out, USAGE_MAN_TAIL("eject(1)")); - exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); + exit(EXIT_SUCCESS); } @@ -223,7 +224,7 @@ static void parse_args(struct eject_control *ctl, int argc, char **argv) ctl->F_option = 1; break; case 'h': - usage(stdout); + usage(); break; case 'i': ctl->i_option = 1; -- cgit v1.2.3-55-g7522