Commit 0c79c197 authored by Harald Sitter's avatar Harald Sitter 🌈
Browse files

style++

parent 5a4e114a
......@@ -142,7 +142,7 @@ protected:
* method segfault on returning try to change the stat*
* variable
*/
int cache_stat(const SMBUrl &url, struct stat *st);
static int cache_stat(const SMBUrl &url, struct stat *st);
//---------------------------------------------
// Configuration functions (kio_smb_config.cpp)
......
......@@ -28,7 +28,7 @@ using namespace KIO;
int SMBSlave::cache_stat(const SMBUrl &url, struct stat *st)
{
int cacheStatErr;
int cacheStatErr = 0;
int result = smbc_stat(url.toSmbcUrl(), st);
if (result == 0) {
cacheStatErr = 0;
......@@ -419,7 +419,7 @@ void SMBSlave::listDir(const QUrl &kurl)
auto maybeFinished = [&] { // finishes if all discoveries finished
bool allFinished = true;
for (auto discoverer : discoverers) {
for (const auto &discoverer : discoverers) {
allFinished = allFinished && discoverer->isFinished();
}
if (allFinished) {
......@@ -492,7 +492,7 @@ void SMBSlave::listDir(const QUrl &kurl)
} else {
udsentry.fastInsert(KIO::UDSEntry::UDS_NAME, ".");
const int statErr = browse_stat_path(m_current_url, udsentry);
if (statErr) {
if (statErr != 0) {
if (statErr == ENOENT || statErr == ENOTDIR) {
reportWarning(m_current_url, statErr);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment