X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=editors%2Fsed.c;h=0f0f4a28d19829907293ab7335e1fe544aee2ad8;hb=f1bbb22dca4d39aa227246f4c2ee90acd7e512a4;hp=0ce9f45e0b527cf6e62e3f6bd73a58dcbf06d94c;hpb=05e782ddd3dc58245c889529bb8aeeaddf24bf71;p=oweals%2Fbusybox.git diff --git a/editors/sed.c b/editors/sed.c index 0ce9f45e0..0f0f4a28d 100644 --- a/editors/sed.c +++ b/editors/sed.c @@ -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++;