summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <philip@tecnocode.co.uk>2018-08-15 14:21:17 +0000
committerPhilip Withnall <philip@tecnocode.co.uk>2018-08-15 14:21:17 +0000
commita28fd39f780bbd6098a4852696de1a432b1a61c1 (patch)
treec899c6f22fb72589ac597d70f08965079c2d36ae
parent24f89a956a22e140db8eca4abdf1338b5c3d4dd8 (diff)
parent63c985f5afecc69eee3fe7a7e04cc8118097b3c3 (diff)
downloaddconf-a28fd39f780bbd6098a4852696de1a432b1a61c1.tar.gz
Merge branch 'style/overflow-int' into 'master'
Engine: Change overflow thresholds in subscription counts from GMAXUINT32 to GMAXUINT See merge request GNOME/dconf!20
-rw-r--r--engine/dconf-engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index ad891e6..dde8c18 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -253,7 +253,7 @@ dconf_engine_move_subscriptions (GHashTable *from_counts,
guint from_count = GPOINTER_TO_UINT (g_hash_table_lookup (from_counts, path));
guint old_to_count = GPOINTER_TO_UINT (g_hash_table_lookup (to_counts, path));
// Detect overflows
- g_assert (old_to_count <= G_MAXUINT32 - from_count);
+ g_assert (old_to_count <= G_MAXUINT - from_count);
guint new_to_count = old_to_count + from_count;
if (from_count != 0)
{
@@ -275,7 +275,7 @@ dconf_engine_inc_subscriptions (GHashTable *counts,
{
guint old_count = GPOINTER_TO_UINT (g_hash_table_lookup (counts, path));
// Detect overflows
- g_assert (old_count < G_MAXUINT32);
+ g_assert (old_count < G_MAXUINT);
guint new_count = old_count + 1;
g_hash_table_replace (counts, g_strdup (path), GUINT_TO_POINTER (new_count));
return new_count;