Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b178a66 authored by Nick Desaulniers's avatar Nick Desaulniers Committed by Gerrit Code Review
Browse files

Merge "[frameworks][base][statsd] fix -Wimplicit-int-float-conversion"

parents 8c4ced5b 58664e8a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ void triggerSubscribers(int64_t ruleId, int64_t metricId, const MetricDimensionK

    for (const Subscription& subscription : subscriptions) {
        if (subscription.probability_of_informing() < 1
                && ((float)rand() / RAND_MAX) >= subscription.probability_of_informing()) {
                && ((float)rand() / (float)RAND_MAX) >= subscription.probability_of_informing()) {
            // Note that due to float imprecision, 0.0 and 1.0 might not truly mean never/always.
            // The config writer was advised to use -0.1 and 1.1 for never/always.
            ALOGI("Fate decided that a subscriber would not be informed.");