simplify sequence number processing
Newer GCC didn't like the complexity of the sequence calculation,
so simplify it.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I884a34e4317c2d33b33abf45687ae159f150f84b
diff --git a/ipmbbridged.cpp b/ipmbbridged.cpp
index 78b1c7f..678c750 100644
--- a/ipmbbridged.cpp
+++ b/ipmbbridged.cpp
@@ -316,11 +316,7 @@
for (int i = 0; i < ipmbMaxOutstandingRequestsCount; i++)
{
- seqNum = ++seqNum & ipmbSeqMask;
- if (seqNum == ipmbMaxOutstandingRequestsCount)
- {
- seqNum = 0;
- }
+ seqNum = (seqNum + 1) % ipmbMaxOutstandingRequestsCount;
if (outstandingRequests[seqNum] == nullptr)
{
diff --git a/ipmbbridged.hpp b/ipmbbridged.hpp
index 77c1dbd..08c68e8 100644
--- a/ipmbbridged.hpp
+++ b/ipmbbridged.hpp
@@ -83,7 +83,6 @@
*/
constexpr uint8_t ipmbNetFnResponseMask = 0x01;
constexpr uint8_t ipmbLunMask = 0x03;
-constexpr uint8_t ipmbSeqMask = 0x3F;
constexpr uint8_t ipmbRsLun = 0x0;
/**