diff --git a/src/simple-mtpfs-fuse.cpp b/src/simple-mtpfs-fuse.cpp index fec30c9..b2706da 100644 --- a/src/simple-mtpfs-fuse.cpp +++ b/src/simple-mtpfs-fuse.cpp @@ -671,10 +671,10 @@ bool SMTPFileSystem::removeDir(const std::string &dirname) std::string path; dir = ::opendir(dirname.c_str()); - if (dir == nullptr) + if (!dir) return false; - while ((entry = ::readdir(dir)) != nullptr) { + while ((entry = ::readdir(dir))) { if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, "..")) { path = dirname + "/" + entry->d_name; if (entry->d_type == DT_DIR) diff --git a/src/simple-mtpfs-mtp-device.cpp b/src/simple-mtpfs-mtp-device.cpp index 0280fd7..f1a5bfe 100644 --- a/src/simple-mtpfs-mtp-device.cpp +++ b/src/simple-mtpfs-mtp-device.cpp @@ -87,7 +87,7 @@ bool MTPDevice::connect(int dev_no) m_device = LIBMTP_Open_Raw_Device_Uncached(&raw_devices[dev_no]); free(static_cast(raw_devices)); - if (m_device == nullptr) + if (!m_device) return false; if (!enumStorages())