summaryrefslogtreecommitdiff
path: root/miscutils/strings.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-08-29 15:48:37 +0000
committerGlenn L McGrath2003-08-29 15:48:37 +0000
commite01c550eab1c4d7299ea9b1ab4801c2e16ab0a03 (patch)
tree3f0b846ce382cacd81d41ddf4e0b1fcdaaae18b3 /miscutils/strings.c
parent21aacba2b7197aa01c2498984b2215049eecaa89 (diff)
downloadbusybox-e01c550eab1c4d7299ea9b1ab4801c2e16ab0a03.zip
busybox-e01c550eab1c4d7299ea9b1ab4801c2e16ab0a03.tar.gz
"A little patch for the strings applet of the busybox development tree
that substitutes two lines of code with a libbb function saving a couple of bytes." - Tito
Diffstat (limited to 'miscutils/strings.c')
-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
{