aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeandro Pereira <leandro@hardinfo.org>2019-07-06 13:33:49 -0700
committerLeandro Pereira <leandro@hardinfo.org>2019-07-06 13:33:49 -0700
commit90051fa72f11f276a1ebbf13cfdd75141388e9db (patch)
treea490f06fdaa3ed6d4583976ad4280b61817e375a
parentbae7c37d19d1826d660d9cab626c4fc1a939766b (diff)
Fix compiler warnings in SPD decoder
-rw-r--r--modules/devices/spd-decode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/devices/spd-decode.c b/modules/devices/spd-decode.c
index 1bebaa14..ed5fca60 100644
--- a/modules/devices/spd-decode.c
+++ b/modules/devices/spd-decode.c
@@ -144,7 +144,7 @@ static void decode_sdr_module_timings(unsigned char *bytes, float *tcl, float *t
if (bytes[18] & 1 << j) { cas[i++] = j + 1; }
}
- ctime = (bytes[9] >> 4 + bytes[9] & 0xf) * 0.1;
+ ctime = ((bytes[9] >> 4) + (bytes[9] & 0xf)) * 0.1;
if (trcd) { *trcd = ceil(bytes[29] / ctime); }
if (trp) { *trp = ceil(bytes[27] / ctime); }
@@ -543,7 +543,7 @@ static void decode_ddr3_module_timings(unsigned char *bytes, float *trcd, float
if (trp) { *trp = bytes[20] * mtb; }
- if (tras) { *tras = (bytes[22] + bytes[21] & 0xf) * mtb; }
+ if (tras) { *tras = (bytes[22] + (bytes[21] & 0xf)) * mtb; }
if (tcl) { *tcl = ceil(taa/ctime); }
}