diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-21 22:02:58 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-22 05:56:06 +0800 |
commit | cb97c2dc8fd97b381af048f206333d5e557892ae (patch) | |
tree | c2901380e607a3b439abb1bed165344ba8f4fc83 /modules/plugin-lib | |
parent | 64fa8ad9c0851e2d5c1e90ac2e75af8d455d9fea (diff) | |
download | gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.gz gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.bz2 gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.lz gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.xz gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.tar.zst gsoc2013-evolution-cb97c2dc8fd97b381af048f206333d5e557892ae.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'modules/plugin-lib')
-rw-r--r-- | modules/plugin-lib/e-plugin-lib.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/modules/plugin-lib/e-plugin-lib.c b/modules/plugin-lib/e-plugin-lib.c index 33ba699258..1bd7190a68 100644 --- a/modules/plugin-lib/e-plugin-lib.c +++ b/modules/plugin-lib/e-plugin-lib.c @@ -46,6 +46,7 @@ plugin_lib_loadmodule (EPlugin *plugin) { EPluginLib *plugin_lib = E_PLUGIN_LIB (plugin); EPluginLibEnableFunc enable; + gboolean found_symbol; if (plugin_lib->module != NULL) return 0; @@ -56,9 +57,13 @@ plugin_lib_loadmodule (EPlugin *plugin) return -1; } - if ((plugin_lib->module = g_module_open (plugin_lib->location, 0)) == NULL) { + plugin_lib->module = g_module_open (plugin_lib->location, 0); + + if (plugin_lib->module == NULL) { plugin->enabled = FALSE; - g_warning ("can't load plugin '%s': %s", plugin_lib->location, g_module_error ()); + g_warning ( + "can't load plugin '%s': %s", + plugin_lib->location, g_module_error ()); return -1; } @@ -66,7 +71,12 @@ plugin_lib_loadmodule (EPlugin *plugin) if (!plugin->enabled) return 0; - if (g_module_symbol (plugin_lib->module, "e_plugin_lib_enable", (gpointer)&enable)) { + found_symbol = g_module_symbol ( + plugin_lib->module, + "e_plugin_lib_enable", + (gpointer) &enable); + + if (found_symbol) { if (enable (plugin, TRUE) != 0) { plugin->enabled = FALSE; g_module_close (plugin_lib->module); |