git.samba.org
/
ira
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06a4159
)
Adapt bucket_range to Samba coding conventions
author
Volker Lendecke
<vl@samba.org>
Wed, 10 Aug 2011 17:52:15 +0000
(19:52 +0200)
committer
Volker Lendecke
<vl@samba.org>
Wed, 10 Aug 2011 17:56:12 +0000
(19:56 +0200)
lib/ccan/tally/tally.c
patch
|
blob
|
history
diff --git
a/lib/ccan/tally/tally.c
b/lib/ccan/tally/tally.c
index e166dd03c532252df2b0e31ed7d41198f390f88b..936b5142561a9ec172fd86a96ddf88a529472842 100644
(file)
--- a/
lib/ccan/tally/tally.c
+++ b/
lib/ccan/tally/tally.c
@@
-367,10
+367,11
@@
static ssize_t bucket_range(const struct tally *tally, unsigned b, size_t *err)
ssize_t min, max;
min = bucket_min(tally->min, tally->step_bits, b);
- if (b == tally->buckets - 1)
+ if (b == tally->buckets - 1)
{
max = tally->max;
- else
+ } else {
max = bucket_min(tally->min, tally->step_bits, b+1) - 1;
+ }
/* FIXME: Think harder about cumulative error; is this enough?. */
*err = (max - min + 1) / 2;