From 61e18baf68d19649cd6506ee487b07d4712d4f34 Mon Sep 17 00:00:00 2001 From: Elcoid <47006046+Elcoid@users.noreply.github.com> Date: Fri, 25 Sep 2026 13:30:18 -0400 Subject: [PATCH] sam: replace C-style 0/1 with C++-style false/true --- libi2pd_client/SAM.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libi2pd_client/SAM.cpp b/libi2pd_client/SAM.cpp index 63afce69..50cb8bf5 100644 --- a/libi2pd_client/SAM.cpp +++ b/libi2pd_client/SAM.cpp @@ -140,7 +140,7 @@ namespace client if (!strcmp (m_Buffer, SAM_HANDSHAKE)) { int minVer = 0, maxVer = 0; - bool verErr = 0; + bool verErr = false; // try to find MIN and MAX, MAX_SAM_VERSION if not found, // since the highest possible version must be returned // given the constraints @@ -157,26 +157,26 @@ namespace client } // if parsing error or impossible version constraints if (minVer == -1 || maxVer == -1 || (minVer && maxVer && minVer > maxVer)) - verErr = 1; + verErr = true; // version negotiation else if (maxVer && minVer) // if both constraints provided { if (maxVer < MIN_SAM_VERSION || minVer > MAX_SAM_VERSION) - verErr = 1; + verErr = true; else m_Version = std::min(maxVer, MAX_SAM_VERSION); } else if (maxVer) // if only max provided { if (maxVer < MIN_SAM_VERSION) - verErr = 1; + verErr = true; else m_Version = std::min(maxVer, MAX_SAM_VERSION); } else if (minVer) // if only min provided { if (minVer > MAX_SAM_VERSION) - verErr = 1; + verErr = true; else m_Version = MAX_SAM_VERSION; }