summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2012-07-12 16:50:22 -0400
committerRyan Lortie <desrt@desrt.ca>2012-07-12 16:50:22 -0400
commit7a4a082f95d3a5c554983b2db285342b1c34d505 (patch)
treeed6b4647c1c3b0dd49c118cf9c28bc2cb51772c0 /engine
parent0725a5fd7cd8a8a3af00b7edbbe8de4216e3f578 (diff)
downloaddconf-7a4a082f95d3a5c554983b2db285342b1c34d505.tar.gz
engine/: source init can never fail
Stop returning a boolean here (since all of the sources always returned TRUE all the time anyway).
Diffstat (limited to 'engine')
-rw-r--r--engine/dconf-engine-source-system.c4
-rw-r--r--engine/dconf-engine-source-user.c4
-rw-r--r--engine/dconf-engine-source.c4
-rw-r--r--engine/dconf-engine-source.h4
-rw-r--r--engine/dconf-engine.c3
5 files changed, 7 insertions, 12 deletions
diff --git a/engine/dconf-engine-source-system.c b/engine/dconf-engine-source-system.c
index fe0d9c6..727bad9 100644
--- a/engine/dconf-engine-source-system.c
+++ b/engine/dconf-engine-source-system.c
@@ -26,14 +26,12 @@
#include <fcntl.h>
#include <errno.h>
-static gboolean
+static void
dconf_engine_source_system_init (DConfEngineSource *source)
{
source->bus_type = G_BUS_TYPE_SYSTEM;
source->bus_name = g_strdup ("ca.desrt.dconf");
source->object_path = g_strdup_printf ("/ca/desrt/dconf/Writer/%s", source->name);
-
- return TRUE;
}
static gboolean
diff --git a/engine/dconf-engine-source-user.c b/engine/dconf-engine-source-user.c
index 5034eec..863d8da 100644
--- a/engine/dconf-engine-source-user.c
+++ b/engine/dconf-engine-source-user.c
@@ -50,7 +50,7 @@ dconf_engine_source_user_open_gvdb (const gchar *name)
return table;
}
-static gboolean
+static void
dconf_engine_source_user_init (DConfEngineSource *source)
{
DConfEngineSourceUser *user_source = (DConfEngineSourceUser *) source;
@@ -62,8 +62,6 @@ dconf_engine_source_user_init (DConfEngineSource *source)
user_source->shm = dconf_shm_open (source->name);
source->values = dconf_engine_source_user_open_gvdb (source->name);
-
- return TRUE;
}
static gboolean
diff --git a/engine/dconf-engine-source.c b/engine/dconf-engine-source.c
index 06a775c..19ae851 100644
--- a/engine/dconf-engine-source.c
+++ b/engine/dconf-engine-source.c
@@ -58,10 +58,10 @@ dconf_engine_source_refresh (DConfEngineSource *source)
return FALSE;
}
-gboolean
+void
dconf_engine_source_init (DConfEngineSource *source)
{
- return source->vtable->init (source);
+ source->vtable->init (source);
}
DConfEngineSource *
diff --git a/engine/dconf-engine-source.h b/engine/dconf-engine-source.h
index 75e0e06..065be14 100644
--- a/engine/dconf-engine-source.h
+++ b/engine/dconf-engine-source.h
@@ -33,7 +33,7 @@ struct _DConfEngineSourceVTable
{
gsize instance_size;
- gboolean (* init) (DConfEngineSource *source);
+ void (* init) (DConfEngineSource *source);
void (* finalize) (DConfEngineSource *source);
gboolean (* needs_reopen) (DConfEngineSource *source);
GvdbTable * (* reopen) (DConfEngineSource *source);
@@ -65,6 +65,6 @@ G_GNUC_INTERNAL
DConfEngineSource * dconf_engine_source_new_default (void);
G_GNUC_INTERNAL
-gboolean dconf_engine_source_init (DConfEngineSource *source);
+void dconf_engine_source_init (DConfEngineSource *source);
#endif /* __dconf_engine_source_h__ */
diff --git a/engine/dconf-engine.c b/engine/dconf-engine.c
index e182e8f..e40126a 100644
--- a/engine/dconf-engine.c
+++ b/engine/dconf-engine.c
@@ -239,8 +239,7 @@ dconf_engine_new (gpointer user_data,
engine->sources = dconf_engine_profile_open (NULL, &engine->n_sources);
for (i = 0; i < engine->n_sources; i++)
- if (!dconf_engine_source_init (engine->sources[i]))
- g_assert_not_reached ();
+ dconf_engine_source_init (engine->sources[i]);
g_mutex_lock (&dconf_engine_global_lock);
dconf_engine_global_list = g_slist_prepend (dconf_engine_global_list, engine);