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/ipcs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys-utils/ipcs.c') diff --git a/sys-utils/ipcs.c b/sys-utils/ipcs.c index 3c4e5df0e..943b09c4a 100644 --- a/sys-utils/ipcs.c +++ b/sys-utils/ipcs.c @@ -46,8 +46,9 @@ static void print_msg (int id, int unit); /* we read time as int64_t from /proc, so cast... */ #define xctime(_x) ctime((time_t *) (_x)) -static void __attribute__ ((__noreturn__)) usage(FILE * out) +static void __attribute__((__noreturn__)) usage(void) { + FILE *out = stdout; fputs(USAGE_HEADER, out); fprintf(out, _(" %1$s [resource-option...] [output-option]\n" " %1$s -m|-q|-s -i \n"), program_invocation_short_name); @@ -78,7 +79,7 @@ static void __attribute__ ((__noreturn__)) usage(FILE * out) fputs(_(" -b, --bytes show sizes in bytes\n"), out); fprintf(out, USAGE_MAN_TAIL("ipcs(1)")); - exit(out == stderr ? EXIT_FAILURE : EXIT_SUCCESS); + exit(EXIT_SUCCESS); } int main (int argc, char **argv) @@ -150,7 +151,7 @@ int main (int argc, char **argv) unit = IPC_UNIT_BYTES; break; case 'h': - usage(stdout); + usage(); case 'V': printf(UTIL_LINUX_VERSION); return EXIT_SUCCESS; -- cgit v1.2.3-55-g7522