summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--miscutils/strings.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/miscutils/strings.c b/miscutils/strings.c
index c914338..6e45345 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -82,8 +82,7 @@ int strings_main(int argc, char **argv)
pipe:
count=0;
- do
- {
+ do{
c=fgetc(file);
if(ISSTR(c))
{
@@ -110,11 +109,9 @@ pipe:
i=0;
}
count++;
- }
- while(c!=EOF);
+ }while(c!=EOF);
- if(file!=stdin)
- fclose(file);
+ bb_fclose_nonstdin(file);
}
else
{