Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a588e099 authored by Kurt Hindenburg's avatar Kurt Hindenburg

readability fixes - braces

parent a8842603
......@@ -144,8 +144,9 @@ void HistoryFile::unmap()
{
Q_ASSERT(_fileMap != nullptr);
if (_tmpFile.unmap(_fileMap))
if (_tmpFile.unmap(_fileMap)) {
_fileMap = nullptr;
}
Q_ASSERT(_fileMap == nullptr);
......@@ -162,8 +163,9 @@ void HistoryFile::add(const char *buffer, qint64 count)
unmap();
}
if (_readWriteBalance < INT_MAX)
if (_readWriteBalance < INT_MAX) {
_readWriteBalance++;
}
qint64 rc = 0;
......@@ -191,8 +193,9 @@ void HistoryFile::get(char *buffer, qint64 size, qint64 loc)
//If there are many more get() calls compared with add()
//calls (decided by using MAP_THRESHOLD) then mmap the log
//file to improve performance.
if (_readWriteBalance > INT_MIN)
if (_readWriteBalance > INT_MIN) {
_readWriteBalance--;
}
if ((_fileMap == nullptr) && _readWriteBalance < MAP_THRESHOLD) {
map();
}
......
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