Fix use of gwbuf_length in mxs::Buffer
Backend should use empty() instead of length() to see if the buffer is empty. The length of a buffer should always be valid to call, even on empty buffers.
This commit is contained in:
@ -253,7 +253,7 @@ bool Backend::write_stored_command()
|
||||
mxb_assert(in_use());
|
||||
bool rval = false;
|
||||
|
||||
if (m_pending_cmd.length())
|
||||
if (!m_pending_cmd.empty())
|
||||
{
|
||||
rval = write(m_pending_cmd.release());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user