From 0e97114f3d43b409af96a8ce05d948358f369ea5 Mon Sep 17 00:00:00 2001 From: Timofei Istomin Date: Thu, 21 Mar 2019 15:35:53 +0100 Subject: [PATCH] Add parenthesis around a macro parameter --- R-package/src/scave/indexedvectorfilereader.cc | 2 +- R-package/src/scave/indexedvectorfilereader2.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/R-package/src/scave/indexedvectorfilereader.cc b/R-package/src/scave/indexedvectorfilereader.cc index 7165b21..35aaf20 100644 --- a/R-package/src/scave/indexedvectorfilereader.cc +++ b/R-package/src/scave/indexedvectorfilereader.cc @@ -124,7 +124,7 @@ long IndexedVectorFileReaderNode::readBlock(const Block *blockPtr, const PortDat const char *file = filename.c_str(); file_offset_t offset; -#define CHECK(cond, msg) {if (!cond) throw opp_runtime_error(msg ", file %s, offset %"LL"d", file, (int64)offset); } +#define CHECK(cond, msg) {if (!(cond)) throw opp_runtime_error(msg ", file %s, offset %"LL"d", file, (int64)offset); } VectorData *vector = portDataPtr->vector; file_offset_t startOffset = blockPtr->startOffset; diff --git a/R-package/src/scave/indexedvectorfilereader2.cc b/R-package/src/scave/indexedvectorfilereader2.cc index afccc24..186f5d1 100644 --- a/R-package/src/scave/indexedvectorfilereader2.cc +++ b/R-package/src/scave/indexedvectorfilereader2.cc @@ -126,7 +126,7 @@ bool IndexedVectorFileReaderNode2::readNextBlock(PortData &portData) const char *file = filename.c_str(); file_offset_t offset; -#define CHECK(cond, msg) {if (!cond) throw opp_runtime_error(msg ", file %s, offset %"LL"d", file, (int64)offset); } +#define CHECK(cond, msg) {if (!(cond)) throw opp_runtime_error(msg ", file %s, offset %"LL"d", file, (int64)offset); } Block &block = vector->blocks[portData.currentBlockIndex++];