projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c29df3c
)
Fix count so that it doesn't make an extra fread call after
author
Dan Gohman
<gohman@apple.com>
Mon, 31 May 2010 16:13:45 +0000
(16:13 +0000)
committer
Dan Gohman
<gohman@apple.com>
Mon, 31 May 2010 16:13:45 +0000
(16:13 +0000)
EOF is detected.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105223
91177308
-0d34-0410-b5e6-
96231b3b80d8
utils/count/count.c
patch
|
blob
|
history
diff --git
a/utils/count/count.c
b/utils/count/count.c
index a37e1e0b25480f46ccebd655654e67639e82389a..13250198b9e4d7d29262a8c0ab643f85e020e134 100644
(file)
--- a/
utils/count/count.c
+++ b/
utils/count/count.c
@@
-26,7
+26,7
@@
int main(int argc, char **argv) {
}
NumLines = 0;
}
NumLines = 0;
- while ((NumRead = fread(Buffer, 1, sizeof(Buffer), stdin))
)
{
+ while ((NumRead = fread(Buffer, 1, sizeof(Buffer), stdin))
== sizeof(Buffer))
{
unsigned i;
for (i = 0; i != NumRead; ++i)
unsigned i;
for (i = 0; i != NumRead; ++i)