projects
/
platform
/
upstream
/
libzypp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97d3a24
)
- Don't read the stream character wise but reading blocks,
author
Duncan Mac-Vicar P
<dmacvicar@suse.de>
Tue, 18 Jul 2006 10:41:01 +0000
(10:41 +0000)
committer
Duncan Mac-Vicar P
<dmacvicar@suse.de>
Tue, 18 Jul 2006 10:41:01 +0000
(10:41 +0000)
as advised by matz profiling.
zypp/Digest.cc
patch
|
blob
|
history
diff --git
a/zypp/Digest.cc
b/zypp/Digest.cc
index
e78070e
..
5af2abe
100644
(file)
--- a/
zypp/Digest.cc
+++ b/
zypp/Digest.cc
@@
-193,17
+193,19
@@
namespace zypp {
return string();
char buf[bufsize];
- size_t num;
+ size_t num
= 0
;
Digest digest;
if(!digest.create(name))
return string();
+
while(is.good())
{
- for(num = 0; num < bufsize && is.get(buf[num]).good(); ++num);
-
- if(num && !digest.update(buf, num))
+ int readed;
+ is.read(buf, bufsize);
+ readed = is.gcount();
+ if(readed && !digest.update(buf, readed))
return string();
}