diff options
author | Andre Heider | 2010-09-05 12:37:59 +0000 |
---|---|---|
committer | Andre Heider | 2010-09-05 12:37:59 +0000 |
commit | 253a0aa7f9756a16d4c6490cebba623b9352b945 (patch) | |
tree | f72be07557d966b9a4720319d206dc7bc5a71d57 /backends/plugins/elf-provider.cpp | |
parent | 07e3a422245e0fb118323ef95f354b81669231d3 (diff) | |
download | scummvm-rg350-253a0aa7f9756a16d4c6490cebba623b9352b945.tar.gz scummvm-rg350-253a0aa7f9756a16d4c6490cebba623b9352b945.tar.bz2 scummvm-rg350-253a0aa7f9756a16d4c6490cebba623b9352b945.zip |
PLUGINS: Fix warnings.
svn-id: r52548
Diffstat (limited to 'backends/plugins/elf-provider.cpp')
-rw-r--r-- | backends/plugins/elf-provider.cpp | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/backends/plugins/elf-provider.cpp b/backends/plugins/elf-provider.cpp index 47f0436ab9..00d93fcd34 100644 --- a/backends/plugins/elf-provider.cpp +++ b/backends/plugins/elf-provider.cpp @@ -31,20 +31,16 @@ #include "common/fs.h" DynamicPlugin::VoidFunc ELFPlugin::findSymbol(const char *symbol) { - void *func; - bool handleNull; - if (_dlHandle == NULL) { - func = NULL; - handleNull = true; - } else { + void *func = 0; + + if (_dlHandle) func = _dlHandle->symbol(symbol); - } + if (!func) { - if (handleNull) { + if (!_dlHandle) warning("elfloader: Failed loading symbol '%s' from plugin '%s' (Handle is NULL)", symbol, _filename.c_str()); - } else { + else warning("elfloader: Failed loading symbol '%s' from plugin '%s'", symbol, _filename.c_str()); - } } // FIXME HACK: This is a HACK to circumvent a clash between the ISO C++ @@ -64,7 +60,7 @@ bool ELFPlugin::loadPlugin() { _dlHandle = obj; } else { delete obj; - _dlHandle = NULL; + _dlHandle = 0; } if (!_dlHandle) { |