From cb97c2dc8fd97b381af048f206333d5e557892ae Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 21 May 2011 10:02:58 -0400 Subject: Coding style and whitespace cleanup. --- modules/plugin-lib/e-plugin-lib.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'modules/plugin-lib') 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); -- cgit v1.2.3