[babl] babl-cache: use clearer arithmetic for dropping 1% of cached fishes
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl-cache: use clearer arithmetic for dropping 1% of cached fishes
- Date: Wed, 23 Nov 2016 19:48:23 +0000 (UTC)
commit e0815e990dc4450f708893f09eee3711f44e7986
Author: Øyvind Kolås <pippin gimp org>
Date: Wed Nov 23 20:45:43 2016 +0100
babl-cache: use clearer arithmetic for dropping 1% of cached fishes
babl/babl-cache.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/babl/babl-cache.c b/babl/babl-cache.c
index 8d5ed61..005fda2 100644
--- a/babl/babl-cache.c
+++ b/babl/babl-cache.c
@@ -237,8 +237,7 @@ void babl_init_db (void)
case '-': /* finalize */
if (babl)
{
- if ( ((babl->fish.pixels+1 + babl->fish.processings) %
- ((tim % 100)+1)) == 0)
+ if (((babl->fish.pixels + babl->fish.processings) % 100) == (tim % 100))
{
/* 1% chance of individual cached conversions being dropped -
* making sure mis-measured conversions do not
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]