Save a few bytes in show_usage
authorGlenn L McGrath <bug1@ihug.co.nz>
Thu, 28 Nov 2002 08:33:04 +0000 (08:33 -0000)
committerGlenn L McGrath <bug1@ihug.co.nz>
Thu, 28 Nov 2002 08:33:04 +0000 (08:33 -0000)
applets/applets.c

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