summaryrefslogtreecommitdiff
path: root/boost/beast/core/impl/file_posix.ipp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/beast/core/impl/file_posix.ipp')
-rw-r--r--boost/beast/core/impl/file_posix.ipp10
1 files changed, 5 insertions, 5 deletions
diff --git a/boost/beast/core/impl/file_posix.ipp b/boost/beast/core/impl/file_posix.ipp
index 96ccdc3bbe..c30a7d020f 100644
--- a/boost/beast/core/impl/file_posix.ipp
+++ b/boost/beast/core/impl/file_posix.ipp
@@ -224,7 +224,7 @@ size(error_code& ec) const
{
if(fd_ == -1)
{
- ec.assign(errc::invalid_argument, generic_category());
+ ec = make_error_code(errc::invalid_argument);
return 0;
}
struct stat st;
@@ -244,7 +244,7 @@ pos(error_code& ec) const
{
if(fd_ == -1)
{
- ec.assign(errc::invalid_argument, generic_category());
+ ec = make_error_code(errc::invalid_argument);
return 0;
}
auto const result = ::lseek(fd_, 0, SEEK_CUR);
@@ -264,7 +264,7 @@ seek(std::uint64_t offset, error_code& ec)
{
if(fd_ == -1)
{
- ec.assign(errc::invalid_argument, generic_category());
+ ec = make_error_code(errc::invalid_argument);
return;
}
auto const result = ::lseek(fd_, offset, SEEK_SET);
@@ -283,7 +283,7 @@ read(void* buffer, std::size_t n, error_code& ec) const
{
if(fd_ == -1)
{
- ec.assign(errc::invalid_argument, generic_category());
+ ec = make_error_code(errc::invalid_argument);
return 0;
}
std::size_t nread = 0;
@@ -319,7 +319,7 @@ write(void const* buffer, std::size_t n, error_code& ec)
{
if(fd_ == -1)
{
- ec.assign(errc::invalid_argument, generic_category());
+ ec = make_error_code(errc::invalid_argument);
return 0;
}
std::size_t nwritten = 0;