diff options
author | Volker Lendecke <vl@samba.org> | 2011-08-10 19:52:15 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2011-08-10 19:56:12 +0200 |
commit | eac2f44cde39d16b827b7e2d360f7a7fb1d940e5 (patch) | |
tree | be9a284e288b4fc7f3e60839a7e55a511162408d /lib | |
parent | 06a41594554a1a6881dcbf9d051a822f8f955b56 (diff) | |
download | samba-eac2f44cde39d16b827b7e2d360f7a7fb1d940e5.tar.gz samba-eac2f44cde39d16b827b7e2d360f7a7fb1d940e5.tar.bz2 samba-eac2f44cde39d16b827b7e2d360f7a7fb1d940e5.zip |
Adapt bucket_range to Samba coding conventions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ccan/tally/tally.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c index e166dd03c5..936b514256 100644 --- 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; |