summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-04-18 12:14:48 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-04-18 12:14:48 +0200
commit861b04457a91f261684616dc9bbc1b54e1413b5f (patch)
treea926e4e3cb8ffd33b30882e4924aeaef25516ae0 /searchlib
parent3a5c9525b5cf94154abf5d82b3d7d872aca3355c (diff)
Brace yourself.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp6
-rw-r--r--searchlib/src/vespa/searchlib/diskindex/zcposting.cpp6
2 files changed, 8 insertions, 4 deletions
diff --git a/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp b/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp
index d5239e3393f..bd896be10d6 100644
--- a/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp
+++ b/searchlib/src/vespa/searchlib/diskindex/bitvectorfile.cpp
@@ -85,10 +85,12 @@ BitVectorFileWrite::open(const vespalib::string &name,
FastOS_FileInterface *datfile = new FastOS_File;
_datFile = new Fast_BufferedFile(datfile);
- if (tuneFileWrite.getWantSyncWrites())
+ if (tuneFileWrite.getWantSyncWrites()) {
_datFile->EnableSyncWrites();
- if (tuneFileWrite.getWantDirectIO())
+ }
+ if (tuneFileWrite.getWantDirectIO()) {
_datFile->EnableDirectIO();
+ }
// XXX no checking for success:
_datFile->OpenWriteOnly(datname.c_str());
diff --git a/searchlib/src/vespa/searchlib/diskindex/zcposting.cpp b/searchlib/src/vespa/searchlib/diskindex/zcposting.cpp
index 0dcf10bcdbe..e416dcf3e61 100644
--- a/searchlib/src/vespa/searchlib/diskindex/zcposting.cpp
+++ b/searchlib/src/vespa/searchlib/diskindex/zcposting.cpp
@@ -926,10 +926,12 @@ Zc4PostingSeqWrite::open(const vespalib::string &name,
const TuneFileSeqWrite &tuneFileWrite,
const FileHeaderContext &fileHeaderContext)
{
- if (tuneFileWrite.getWantSyncWrites())
+ if (tuneFileWrite.getWantSyncWrites()) {
_file.EnableSyncWrites();
- if (tuneFileWrite.getWantDirectIO())
+ }
+ if (tuneFileWrite.getWantDirectIO()) {
_file.EnableDirectIO();
+ }
bool ok = _file.OpenWriteOnly(name.c_str());
if (!ok) {
LOG(error, "could not open '%s' for writing: %s",