projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A small cleanup by Vladimir
[oweals/busybox.git]
/
editors
/
sed.c
diff --git
a/editors/sed.c
b/editors/sed.c
index 0ce9f45e0b527cf6e62e3f6bd73a58dcbf06d94c..0f0f4a28d19829907293ab7335e1fe544aee2ad8 100644
(file)
--- 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 */
#endif
/* do normal option parsing */
- while ((opt = getopt(argc, argv, "
h
ne:f:")) > 0) {
+ while ((opt = getopt(argc, argv, "ne:f:")) > 0) {
switch (opt) {
switch (opt) {
- case 'h':
- usage(sed_usage);
- break;
case 'n':
be_quiet++;
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;
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)
* 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++;
else {
add_cmd_str(argv[optind]);
optind++;