summaryrefslogtreecommitdiff
path: root/src/maildir-writecache.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/maildir-writecache.cc')
-rw-r--r--src/maildir-writecache.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/maildir-writecache.cc b/src/maildir-writecache.cc
index ceb2f81..63d7541 100644
--- a/src/maildir-writecache.cc
+++ b/src/maildir-writecache.cc
@@ -48,8 +48,8 @@ bool Binc::Maildir::writeCache(void)
message.getSize(),
message.getUnique().c_str());
std::vector<std::string> cflags = message.getCustomFlags();
- for (std::vector<std::string>::const_iterator it = cflags.begin(); it != cflags.end(); ++it)
- fprintf(fp, " %s", (*it).c_str());
+ for (const auto &it : cflags)
+ fprintf(fp, " %s", it.c_str());
fprintf(fp, "\n");
}
@@ -64,7 +64,8 @@ bool Binc::Maildir::writeCache(void)
}
int dfd = open(path.c_str(), O_RDONLY);
- if (dfd == -1 || (fsync(fd) && (errno != EROFS || errno != EINVAL)) || close(dfd)) return false;
+ if (dfd == -1 || (fsync(fd) && (errno != EROFS || errno != EINVAL)) || close(dfd))
+ return false;
return true;
}