some code cleanup
This commit is contained in:
parent
dbcd8b462e
commit
60900a9d91
|
@ -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)
|
||||
|
|
|
@ -87,7 +87,7 @@ bool MTPDevice::connect(int dev_no)
|
|||
|
||||
m_device = LIBMTP_Open_Raw_Device_Uncached(&raw_devices[dev_no]);
|
||||
free(static_cast<void*>(raw_devices));
|
||||
if (m_device == nullptr)
|
||||
if (!m_device)
|
||||
return false;
|
||||
|
||||
if (!enumStorages())
|
||||
|
|
Loading…
Reference in New Issue