diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2003-08-29 15:48:37 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2003-08-29 15:48:37 +0000 |
commit | e01c550eab1c4d7299ea9b1ab4801c2e16ab0a03 (patch) | |
tree | 3f0b846ce382cacd81d41ddf4e0b1fcdaaae18b3 /miscutils | |
parent | 21aacba2b7197aa01c2498984b2215049eecaa89 (diff) | |
download | busybox-w32-e01c550eab1c4d7299ea9b1ab4801c2e16ab0a03.tar.gz busybox-w32-e01c550eab1c4d7299ea9b1ab4801c2e16ab0a03.tar.bz2 busybox-w32-e01c550eab1c4d7299ea9b1ab4801c2e16ab0a03.zip |
"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')
-rw-r--r-- | miscutils/strings.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/miscutils/strings.c b/miscutils/strings.c index c914338d5..6e4534585 100644 --- a/miscutils/strings.c +++ b/miscutils/strings.c | |||
@@ -82,8 +82,7 @@ int strings_main(int argc, char **argv) | |||
82 | pipe: | 82 | pipe: |
83 | 83 | ||
84 | count=0; | 84 | count=0; |
85 | do | 85 | do{ |
86 | { | ||
87 | c=fgetc(file); | 86 | c=fgetc(file); |
88 | if(ISSTR(c)) | 87 | if(ISSTR(c)) |
89 | { | 88 | { |
@@ -110,11 +109,9 @@ pipe: | |||
110 | i=0; | 109 | i=0; |
111 | } | 110 | } |
112 | count++; | 111 | count++; |
113 | } | 112 | }while(c!=EOF); |
114 | while(c!=EOF); | ||
115 | 113 | ||
116 | if(file!=stdin) | 114 | bb_fclose_nonstdin(file); |
117 | fclose(file); | ||
118 | } | 115 | } |
119 | else | 116 | else |
120 | { | 117 | { |