1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-27 16:01:57 +03:00

MCOL-3563: fix compiler warnings / type errors.

A previous commit made posix::read changed return value
from bool to int. However some callers still expected
bool and compared a bool<0 which is always false.
This commit is contained in:
benthompson15
2019-10-31 14:53:27 -05:00
parent 6b916675d5
commit 3a730a4222
6 changed files with 17 additions and 18 deletions

View File

@@ -37,7 +37,7 @@ ListDirectoryTask::~ListDirectoryTask()
}
#define check_error(msg, ret) \
if (success<0) \
if (!success) \
{ \
handleError(msg, errno); \
return ret; \
@@ -85,8 +85,12 @@ bool ListDirectoryTask::run()
return true;
}
success = read(buf, getLength());
check_error("ListDirectoryTask read", false);
err = read(buf, getLength());
if (err<0)
{
handleError("ListDirectoryTask read", errno);
return false;
}
listdir_cmd *cmd = (listdir_cmd *) buf;
#ifdef SM_TRACE