summaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/circlebuf.cc4
-rw-r--r--src/base/intmath.hh6
-rw-r--r--src/base/random_mt.cc6
-rw-r--r--src/base/stats/text.cc8
4 files changed, 12 insertions, 12 deletions
diff --git a/src/base/circlebuf.cc b/src/base/circlebuf.cc
index d42bb11c3..06d0075b2 100644
--- a/src/base/circlebuf.cc
+++ b/src/base/circlebuf.cc
@@ -208,7 +208,7 @@ CircleBuf::write(const char *b, int len)
_rollover = true;
}
- if (old_start > old_stop && old_start < _stop ||
- old_start < old_stop && _stop < old_stop)
+ if ((old_start > old_stop && old_start < _stop) ||
+ (old_start < old_stop && _stop < old_stop))
_start = _stop + 1;
}
diff --git a/src/base/intmath.hh b/src/base/intmath.hh
index 227012e30..c536fda51 100644
--- a/src/base/intmath.hh
+++ b/src/base/intmath.hh
@@ -197,9 +197,9 @@ roundDown(T val, int align)
inline bool
isHex(char c)
{
- return c >= '0' && c <= '9' ||
- c >= 'A' && c <= 'F' ||
- c >= 'a' && c <= 'f';
+ return (c >= '0' && c <= '9') ||
+ (c >= 'A' && c <= 'F') ||
+ (c >= 'a' && c <= 'f');
}
inline bool
diff --git a/src/base/random_mt.cc b/src/base/random_mt.cc
index 1492240ee..6ea54ec03 100644
--- a/src/base/random_mt.cc
+++ b/src/base/random_mt.cc
@@ -123,15 +123,15 @@ Random::genrand()
int kk;
for (kk = 0; kk < N - M; kk++) {
- y = mt[kk] & UPPER_MASK | mt[kk+1] & LOWER_MASK;
+ y = (mt[kk] & UPPER_MASK) | (mt[kk+1] & LOWER_MASK);
mt[kk] = mt[kk + M] ^ (y >> 1) ^ mag01[y & 0x1UL];
}
for (; kk < N - 1; kk++) {
- y = mt[kk] & UPPER_MASK | mt[kk+1] & LOWER_MASK;
+ y = (mt[kk] & UPPER_MASK) | (mt[kk+1] & LOWER_MASK);
mt[kk] = mt[kk + (M - N)] ^ (y >> 1) ^ mag01[y & 0x1UL];
}
- y = mt[N - 1] & UPPER_MASK | mt[0] & LOWER_MASK;
+ y = (mt[N - 1] & UPPER_MASK) | (mt[0] & LOWER_MASK);
mt[N - 1] = mt[M - 1] ^ (y >> 1) ^ mag01[y & 0x1UL];
mti = 0;
diff --git a/src/base/stats/text.cc b/src/base/stats/text.cc
index a018c4837..6f40d92c8 100644
--- a/src/base/stats/text.cc
+++ b/src/base/stats/text.cc
@@ -191,8 +191,8 @@ struct ScalarPrint
void
ScalarPrint::operator()(ostream &stream) const
{
- if (flags & nozero && value == 0.0 ||
- flags & nonan && isnan(value))
+ if ((flags & nozero && value == 0.0) ||
+ (flags & nonan && isnan(value)))
return;
stringstream pdfstr, cdfstr;
@@ -474,8 +474,8 @@ DistPrint::operator()(ostream &stream) const
print.flags = flags | __substat;
for (int i = 0; i < size; ++i) {
- if (flags & nozero && vec[i] == 0.0 ||
- flags & nonan && isnan(vec[i]))
+ if ((flags & nozero && vec[i] == 0.0) ||
+ (flags & nonan && isnan(vec[i])))
continue;
_min = i * bucket_size + min;