Commit f05864ce authored by Christian Schoenebeck's avatar Christian Schoenebeck Committed by Sandro Knauß
Browse files

Adjust code style

- Don't use ++pos incrementation in expression.
- Don't use Elvis operator.
parent f85cf21c
......@@ -254,8 +254,8 @@ QByteArray foldHeader(const QByteArray &header)
}
// fast forward to header body
int pos = header.indexOf(':');
if (pos < 0 || ++pos >= header.length()) {
int pos = header.indexOf(':') + 1;
if (pos <= 0 || pos >= header.length()) {
return header;
}
......@@ -278,7 +278,7 @@ QByteArray foldHeader(const QByteArray &header)
if (pos - start > maxLen && eligible) {
// Fold line preferably at recommended position, at eligible position
// otherwise.
const int fws = recommended ?: eligible;
const int fws = recommended ? recommended : eligible;
hdr.insert(fws, '\n');
// We started a new line, so reset.
if (eligible <= fws) {
......
Supports Markdown
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