mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-30 07:23:07 +03:00
Refs codership/wsrep-lib#124 32-bit compilation fix
This commit is contained in:
12
src/gtid.cpp
12
src/gtid.cpp
@ -61,19 +61,19 @@ ssize_t wsrep::scan_from_c_str(
|
|||||||
{
|
{
|
||||||
std::istringstream is(std::string(buf, buf_len));
|
std::istringstream is(std::string(buf, buf_len));
|
||||||
is >> gtid;
|
is >> gtid;
|
||||||
// Whole string was consumed without failures
|
|
||||||
if (is && is.eof())
|
|
||||||
{
|
|
||||||
return static_cast<ssize_t>(buf_len);
|
|
||||||
}
|
|
||||||
// Some failure occurred
|
// Some failure occurred
|
||||||
if (!is)
|
if (!is)
|
||||||
{
|
{
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
// Whole string was consumed without failures
|
||||||
|
if (is.eof())
|
||||||
|
{
|
||||||
|
return static_cast<ssize_t>(buf_len);
|
||||||
|
}
|
||||||
// The string was not consumed completely, return current position
|
// The string was not consumed completely, return current position
|
||||||
// of the istream.
|
// of the istream.
|
||||||
return is.tellg();
|
return static_cast<ssize_t>(is.tellg());
|
||||||
}
|
}
|
||||||
|
|
||||||
ssize_t wsrep::print_to_c_str(
|
ssize_t wsrep::print_to_c_str(
|
||||||
|
Reference in New Issue
Block a user