projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21aacba
)
"A little patch for the strings applet of the busybox development tree
author
Glenn L McGrath
<bug1@ihug.co.nz>
Fri, 29 Aug 2003 15:48:37 +0000
(15:48 -0000)
committer
Glenn L McGrath
<bug1@ihug.co.nz>
Fri, 29 Aug 2003 15:48:37 +0000
(15:48 -0000)
that substitutes two lines of code with a libbb function saving a couple
of bytes." - Tito
miscutils/strings.c
patch
|
blob
|
history
diff --git
a/miscutils/strings.c
b/miscutils/strings.c
index c914338d5498ccb2c0f19e95a5429d5d2f42a868..6e45345855aabdd6444147286df859f0e3ebced7 100644
(file)
--- 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
{