X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftally%2Ftally.c;h=b1bc70b8dbeb7350dcfca63767fea4abbee6ef71;hp=20e99dcb870dac2d56c539e6873cc1618d84d22f;hb=d1f92df64d098fbf612789b6c9929ff3e203adde;hpb=e31e88bc5b7c2a018323e80f5662cf82a2c39660 diff --git a/ccan/tally/tally.c b/ccan/tally/tally.c index 20e99dcb..b1bc70b8 100644 --- a/ccan/tally/tally.c +++ b/ccan/tally/tally.c @@ -422,9 +422,11 @@ static unsigned get_max_bucket(const struct tally *tally) { unsigned int i; - for (i = tally->buckets; i > 0; i--) - if (tally->counts[i-1]) + for (i = tally->buckets; i > 0; i--) { + if (tally->counts[i-1]) { break; + } + } return i; }