summaryrefslogtreecommitdiffhomepage
path: root/coreutils/cat.c
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils/cat.c')
-rw-r--r--coreutils/cat.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/coreutils/cat.c b/coreutils/cat.c
index 181d96a2c..989147b39 100644
--- a/coreutils/cat.c
+++ b/coreutils/cat.c
@@ -17,18 +17,14 @@
int bb_cat(char **argv)
{
- static const char *const argv_dash[] = { "-", NULL };
-
int fd;
int retval = EXIT_SUCCESS;
if (!*argv)
- argv = (char**) &argv_dash;
+ argv = (char**) &bb_argv_dash;
do {
- fd = STDIN_FILENO;
- if (!LONE_DASH(*argv))
- fd = open_or_warn(*argv, O_RDONLY);
+ fd = open_or_warn_stdin(*argv);
if (fd >= 0) {
/* This is not a xfunc - never exits */
off_t r = bb_copyfd_eof(fd, STDOUT_FILENO);