From 5986aa96f2d8f06c1a54be614f483712e7d4d8f0 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 5 Sep 2010 12:39:28 +0000 Subject: PLUGINS: Formatting. svn-id: r52552 --- backends/plugins/elf-provider.cpp | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) (limited to 'backends/plugins/elf-provider.cpp') diff --git a/backends/plugins/elf-provider.cpp b/backends/plugins/elf-provider.cpp index 00d93fcd34..997a43b653 100644 --- a/backends/plugins/elf-provider.cpp +++ b/backends/plugins/elf-provider.cpp @@ -54,27 +54,26 @@ DynamicPlugin::VoidFunc ELFPlugin::findSymbol(const char *symbol) { } bool ELFPlugin::loadPlugin() { - assert(!_dlHandle); - DLObject *obj = makeDLObject(); - if (obj->open(_filename.c_str())) { - _dlHandle = obj; - } else { - delete obj; - _dlHandle = 0; - } + assert(!_dlHandle); + DLObject *obj = makeDLObject(); + if (obj->open(_filename.c_str())) { + _dlHandle = obj; + } else { + delete obj; + _dlHandle = 0; + } - if (!_dlHandle) { - warning("elfloader: Failed loading plugin '%s'", _filename.c_str()); - return false; - } + if (!_dlHandle) { + warning("elfloader: Failed loading plugin '%s'", _filename.c_str()); + return false; + } - bool ret = DynamicPlugin::loadPlugin(); + bool ret = DynamicPlugin::loadPlugin(); - if (ret && _dlHandle) { - _dlHandle->discard_symtab(); - } + if (ret && _dlHandle) + _dlHandle->discard_symtab(); - return ret; + return ret; } void ELFPlugin::unloadPlugin() { @@ -91,9 +90,9 @@ void ELFPlugin::unloadPlugin() { bool ELFPluginProvider::isPluginFilename(const Common::FSNode &node) const { // Check the plugin suffix Common::String filename = node.getName(); - if (!filename.hasSuffix(".PLG") && !filename.hasSuffix(".plg") && !filename.hasSuffix(".PLUGIN") && !filename.hasSuffix(".plugin")) { + if (!filename.hasSuffix(".PLG") && !filename.hasSuffix(".plg") && !filename.hasSuffix(".PLUGIN") && !filename.hasSuffix(".plugin")) return false; - } + return true; } -- cgit v1.2.3