aboutsummaryrefslogtreecommitdiff
path: root/miscutils/strings.c
diff options
context:
space:
mode:
Diffstat (limited to 'miscutils/strings.c')
-rw-r--r--miscutils/strings.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/miscutils/strings.c b/miscutils/strings.c
index 57a2c0a17..5efbabf6f 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -23,7 +23,7 @@ int strings_main(int argc ATTRIBUTE_UNUSED, char **argv)
unsigned opt;
unsigned count;
off_t offset;
- FILE *file = stdin;
+ FILE *file;
char *string;
const char *fmt = "%s: ";
const char *n_arg = "4";
@@ -40,16 +40,14 @@ int strings_main(int argc ATTRIBUTE_UNUSED, char **argv)
if (!*argv) {
fmt = "{%s}: ";
*--argv = (char *)bb_msg_standard_input;
- goto PIPE;
}
do {
- file = fopen_or_warn(*argv, "r");
+ file = fopen_or_warn_stdin(*argv);
if (!file) {
status = EXIT_FAILURE;
continue;
}
- PIPE:
offset = 0;
count = 0;
do {