From 0cec027030c37655c790216f78cf01c12fadaae3 Mon Sep 17 00:00:00 2001 From: Alexey Yurchenko Date: Fri, 20 Mar 2020 13:52:50 +0000 Subject: [PATCH] Refs codership/wsrep-lib#124 32-bit compilation fix --- src/gtid.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gtid.cpp b/src/gtid.cpp index 2bc139f..af32d52 100644 --- a/src/gtid.cpp +++ b/src/gtid.cpp @@ -61,19 +61,19 @@ ssize_t wsrep::scan_from_c_str( { std::istringstream is(std::string(buf, buf_len)); is >> gtid; - // Whole string was consumed without failures - if (is && is.eof()) - { - return static_cast(buf_len); - } // Some failure occurred if (!is) { return -EINVAL; } + // Whole string was consumed without failures + if (is.eof()) + { + return static_cast(buf_len); + } // The string was not consumed completely, return current position // of the istream. - return is.tellg(); + return static_cast(is.tellg()); } ssize_t wsrep::print_to_c_str(