aboutsummaryrefslogtreecommitdiff
path: root/miscutils/rx.c
diff options
context:
space:
mode:
authorGravatar Denys Vlasenko <vda.linux@googlemail.com>2009-11-28 15:18:53 +0100
committerGravatar Denys Vlasenko <vda.linux@googlemail.com>2009-11-28 15:18:53 +0100
commite992bae6f9adf3718c6263a36c004ead1c7272a8 (patch)
treef0bc9e4fa145f58ab3f9838902e09f9cfba29648 /miscutils/rx.c
parent86cfb70ca5f2bde11f2d071bc59db75291d8552f (diff)
downloadbusybox-e992bae6f9adf3718c6263a36c004ead1c7272a8.tar.gz
busybox-e992bae6f9adf3718c6263a36c004ead1c7272a8.tar.bz2
*: remove a few more cases of argc usage. -89 bytes.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/rx.c')
-rw-r--r--miscutils/rx.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/miscutils/rx.c b/miscutils/rx.c
index 3a8b6a8fe..4c5d5a19c 100644
--- a/miscutils/rx.c
+++ b/miscutils/rx.c
@@ -234,21 +234,18 @@ static void sigalrm_handler(int UNUSED_PARAM signum)
}
int rx_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
-int rx_main(int argc, char **argv)
+int rx_main(int argc UNUSED_PARAM, char **argv)
{
struct termios tty, orig_tty;
int termios_err;
int file_fd;
int n;
- if (argc != 2)
- bb_show_usage();
-
/* Disabled by vda:
* why we can't receive from stdin? Why we *require*
* controlling tty?? */
/*read_fd = xopen(CURRENT_TTY, O_RDWR);*/
- file_fd = xopen(argv[1], O_RDWR|O_CREAT|O_TRUNC);
+ file_fd = xopen(single_argv(argv), O_RDWR|O_CREAT|O_TRUNC);
termios_err = tcgetattr(read_fd, &tty);
if (termios_err == 0) {