Commit ce3198f0 authored by Volker Lendecke's avatar Volker Lendecke Committed by Rusty Russell

tally: Adapt bucket_range to Samba coding conventions

(Imported from SAMBA commit eac2f44cde39d16b827b7e2d360f7a7fb1d940e5)
parent 6697a3dd
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment