We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d9dbb1f commit 222a09aCopy full SHA for 222a09a
1 file changed
src/libappimage/utils/DLHandle.h
@@ -28,7 +28,7 @@ namespace appimage {
28
explicit DLHandle(const std::string& libName, int mode) : handle(nullptr), libName(libName) {
29
handle = dlopen(libName.c_str(), mode);
30
31
- if (!handle)
+ if (handle == nullptr)
32
throw DLHandleError("Unable to load " + libName);
33
}
34
@@ -41,13 +41,13 @@ namespace appimage {
41
explicit DLHandle(std::initializer_list<const std::string> libNames, int mode) : handle(nullptr) {
42
for (const auto& item: libNames) {
43
handle = dlopen(item.c_str(), mode);
44
- if (handle) {
+ if (handle != nullptr) {
45
libName = item;
46
break;
47
48
49
50
- if (!handle) {
+ if (handle == nullptr) {
51
std::string libNamesStr;
52
for (const auto& item: libNames)
53
libNamesStr += " " + item;
0 commit comments