From 3bd8bd89ee9d0b65bf279e1ecad826a5f2f0a217 Mon Sep 17 00:00:00 2001 From: Matt Kraai Date: Fri, 14 Jul 2000 23:28:47 +0000 Subject: Don't use strings directly in calls to usage(). This is in preparation for their extraction to a separate file. --- findutils/which.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'findutils') diff --git a/findutils/which.c b/findutils/which.c index 8d4422a78..186bfdad7 100644 --- a/findutils/which.c +++ b/findutils/which.c @@ -26,6 +26,12 @@ #include #include +const char which_usage[] = + "which [COMMAND ...]\n" +#ifndef BB_FEATURE_TRIVIAL_HELP + "\nLocates a COMMAND.\n" +#endif + ; extern int which_main(int argc, char **argv) { @@ -34,13 +40,8 @@ extern int which_main(int argc, char **argv) struct stat filestat; int count = 0; - if (argc <= 1 || **(argv + 1) == '-') { - usage("which [COMMAND ...]\n" -#ifndef BB_FEATURE_TRIVIAL_HELP - "\nLocates a COMMAND.\n" -#endif - ); - } + if (argc <= 1 || **(argv + 1) == '-') + usage(which_usage); argc--; path_list = getenv("PATH"); -- cgit v1.2.3