summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-07-10 11:43:11 -0400
committerRyan Lortie <desrt@desrt.ca>2012-07-10 11:43:11 -0400
commit8317a107de299e5e03dc5511fefdcf5383a82bd7 (patch)
treee7ee8c3af1b20caa3dd35cd8cfd4b8785c8e259f /common
parenta1b7bbb13507ba2381d78977c6c99d5aa0c1f1ba (diff)
downloaddconf-8317a107de299e5e03dc5511fefdcf5383a82bd7.tar.gz
DConfChangeset: pointless fiddling with asserts
Adjust the way that an assert is done in order to convince lcov that we have 100% line coverage (since the 'g_assert_not_reached()' wasn't being hit before).
Diffstat (limited to 'common')
-rw-r--r--common/dconf-changeset.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/common/dconf-changeset.c b/common/dconf-changeset.c
index 195841a..177f682 100644
--- a/common/dconf-changeset.c
+++ b/common/dconf-changeset.c
@@ -337,13 +337,14 @@ dconf_changeset_build_description (DConfChangeset *changeset)
{
GHashTableIter iter;
const gchar *first;
+ gboolean have_one;
gpointer key;
g_hash_table_iter_init (&iter, changeset->table);
/* We checked above that we have at least one item. */
- if (!g_hash_table_iter_next (&iter, &key, NULL))
- g_assert_not_reached ();
+ have_one = g_hash_table_iter_next (&iter, &key, NULL);
+ g_assert (have_one);
prefix_length = strlen (key);
first = key;