Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f853b77
)
Tweaked the calculation that goes into sum->count so that it cannot
author
Wayne Davison
<wayned@samba.org>
Tue, 6 Sep 2005 18:12:38 +0000
(18:12 +0000)
committer
Wayne Davison
<wayned@samba.org>
Tue, 6 Sep 2005 18:12:38 +0000
(18:12 +0000)
overflow into a negative value (which is particularly important if
configure didn't find a real int64 type).
generator.c
patch
|
blob
|
blame
|
history
diff --git
a/generator.c
b/generator.c
index
08ea1db
..
3ed3385
100644
(file)
--- a/
generator.c
+++ b/
generator.c
@@
-446,8
+446,8
@@
static void sum_sizes_sqroot(struct sum_struct *sum, int64 len)
sum->flength = len;
sum->blength = blength;
sum->s2length = s2length;
- sum->
count = (len + (blength - 1)) /
blength;
- sum->
remainder = (len % blength
);
+ sum->
remainder = len %
blength;
+ sum->
count = len / blength + (sum->remainder != 0
);
if (sum->count && verbose > 2) {
rprintf(FINFO,