diff --git a/src/Functions/FunctionFile.cpp b/src/Functions/FunctionFile.cpp index e856befa9d1..f491ad54bf2 100644 --- a/src/Functions/FunctionFile.cpp +++ b/src/Functions/FunctionFile.cpp @@ -77,7 +77,7 @@ public: //To read directly into the String buf, avoiding one redundant copy ssize_t bytes_read = pread(fd, res_buf, file_length, 0); - if (bytes_read == -1) + if (-1 == bytes_read) throwFromErrnoWithPath("Read failed for " + std::string(filename), std::string(filename), errno == EBADF ? ErrorCodes::CANNOT_READ_FROM_FILE_DESCRIPTOR : ErrorCodes::ILLEGAL_COLUMN); if (static_cast(bytes_read) != file_length)