[babl] make fish hashes less likely to fail
- From: Øyvind Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] make fish hashes less likely to fail
- Date: Tue, 3 Jan 2017 17:00:53 +0000 (UTC)
commit 4c8edae7cb5fbbfedc5dd9884d94b0495dfc5702
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Dec 31 20:26:35 2016 +0100
make fish hashes less likely to fail
babl/babl-fish.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/babl/babl-fish.c b/babl/babl-fish.c
index 76cb53d..96c69c3 100644
--- a/babl/babl-fish.c
+++ b/babl/babl-fish.c
@@ -133,6 +133,8 @@ babl_fish_get_id (const Babl *source,
* source/destination values. */
ptrdiff_t id = source - destination;
/* instances with id 0 won't be inserted into database */
+ id *= ((((size_t) (source))) % 37);
+
if (id == 0)
id = 1;
return id;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]