summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ccan/tally/tally.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ccan/tally/tally.c b/lib/ccan/tally/tally.c
index 20e99dcb87..b1bc70b8db 100644
--- a/lib/ccan/tally/tally.c
+++ b/lib/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;
}