From e31e88bc5b7c2a018323e80f5662cf82a2c39660 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 10 Aug 2011 19:52:40 +0200 Subject: [PATCH] tally: Adapt tally_approx_median to Samba coding conventions (Imported from SAMBA commit 35550ba641d251a2dc3762b08eda92d0f7ce6bed) --- ccan/tally/tally.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ccan/tally/tally.c b/ccan/tally/tally.c index 936b5142..20e99dcb 100644 --- a/ccan/tally/tally.c +++ b/ccan/tally/tally.c @@ -386,8 +386,9 @@ ssize_t tally_approx_median(const struct tally *tally, size_t *err) for (i = 0; i < tally->buckets; i++) { total += tally->counts[i]; - if (total * 2 >= count) + if (total * 2 >= count) { break; + } } return bucket_range(tally, i, err); } -- 2.39.2