A small cleanup by Vladimir
[oweals/busybox.git] / editors / sed.c
index 0ce9f45e0b527cf6e62e3f6bd73a58dcbf06d94c..0f0f4a28d19829907293ab7335e1fe544aee2ad8 100644 (file)
@@ -670,11 +670,8 @@ extern int sed_main(int argc, char **argv)
 #endif
 
        /* do normal option parsing */
-       while ((opt = getopt(argc, argv, "hne:f:")) > 0) {
+       while ((opt = getopt(argc, argv, "ne:f:")) > 0) {
                switch (opt) {
-                       case 'h':
-                               usage(sed_usage);
-                               break;
                        case 'n':
                                be_quiet++;
                                break;
@@ -684,6 +681,8 @@ extern int sed_main(int argc, char **argv)
                        case 'f': 
                                load_cmd_file(optarg);
                                break;
+                       default:
+                               show_usage();
                }
        }
 
@@ -691,7 +690,7 @@ extern int sed_main(int argc, char **argv)
         * argv[optind] should be the pattern. no pattern, no worky */
        if (ncmds == 0) {
                if (argv[optind] == NULL)
-                       usage(sed_usage);
+                       show_usage();
                else {
                        add_cmd_str(argv[optind]);
                        optind++;