tally: Adapt tally_approx_median to Samba coding conventions
authorVolker Lendecke <vl@samba.org>
Wed, 10 Aug 2011 17:52:40 +0000 (19:52 +0200)
committerRusty Russell <rusty@rustcorp.com.au>
Wed, 31 Aug 2011 01:09:12 +0000 (10:39 +0930)
(Imported from SAMBA commit 35550ba641d251a2dc3762b08eda92d0f7ce6bed)

ccan/tally/tally.c

index 936b5142561a9ec172fd86a96ddf88a529472842..20e99dcb870dac2d56c539e6873cc1618d84d22f 100644 (file)
@@ -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);
 }