Change-Id: I8d76b51da9a11e60f3a2375530c5877b68e32596
Signed-off-by: Andrzej Popowski <a.popowski@samsung.com>
!fname.compare(fname.size() - postfix_.size(), postfix_.size(),
postfix_)) {
std::string so_path = tce_path + "/" + fname;
- char* error;
void *handle = dlopen(so_path.c_str(), RTLD_LAZY);
- if ((error = dlerror()) != NULL) {
+ if (handle == NULL) {
std::cerr << "cannot open " << so_path << std::endl;
- std::cerr << "Error >>" << error << std::endl;
+ char* error = dlerror();
+ std::cerr << "Error >>" << ((error == NULL) ? "NULL" : error) << std::endl;
return -1;
}
// it would be need for ignore loaded libraries destructor
_exit(0);
-
- return 0;
}