Save a few bytes in show_usage

This commit is contained in:
Glenn L McGrath 2002-11-28 08:33:04 +00:00
parent 9c802416ab
commit 6ead3abd55

View File

@ -80,7 +80,6 @@ static struct BB_suid_config *suid_config;
extern void show_usage(void) extern void show_usage(void)
{ {
const char *format_string;
const char *usage_string = usage_messages; const char *usage_string = usage_messages;
int i; int i;
@ -89,11 +88,12 @@ extern void show_usage(void)
--i; --i;
} }
} }
format_string = "%s\n\nUsage: %s %s\n\n";
if(*usage_string == '\b') if(*usage_string == '\b') {
format_string = "%s\n\nNo help available.\n\n"; fprintf(stderr, "%s\n\nNo help available.\n\n", full_version);
fprintf(stderr, format_string, } else {
full_version, applet_using->name, usage_string); fprintf(stderr, "%s\n\nUsage: %s %s\n\n", full_version, applet_using->name, usage_string);
}
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }