diff options
author | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-06-08 15:56:47 +0300 |
---|---|---|
committer | Niall Douglas (s [underscore] sourceforge {at} nedprod [dot] com) <spamtrap@nedprod.com> | 2018-06-08 15:56:47 +0300 |
commit | bb8e0486b65586cb22e81ef12c088eef1dc34c1b (patch) | |
tree | c9061c260524c22e2505c40b61ad5235d27ae866 /programs | |
parent | bdcaed8b63fc6f95096d1684038109190da83b09 (diff) |
Fix AFIO programs, which had got broke once again.
Diffstat (limited to 'programs')
-rw-r--r-- | programs/key-value-store/main.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/programs/key-value-store/main.cpp b/programs/key-value-store/main.cpp index 0675c38c..96a4eb17 100644 --- a/programs/key-value-store/main.cpp +++ b/programs/key-value-store/main.cpp @@ -46,7 +46,7 @@ namespace stackoverflow if(!_fh) { // Fetch the error code - std::error_code ec = _fh.error().ec; + std::error_code ec = make_error_code(_fh.error()); // Did we fail due to file not found? // It is *very* important to note that ec contains the *original* error code which could // be POSIX, or Win32 or NT kernel error code domains. However we can always compare, @@ -70,7 +70,7 @@ namespace stackoverflow file_handle::io_result<file_handle::buffers_type> _buffers_read = read(fh, {reqs, 0}); if(!_buffers_read) { - std::error_code ec = _fh.error().ec; + std::error_code ec = make_error_code(_fh.error()); std::cerr << "Reading the file " << path << " failed with " << ec.message() << std::endl; } // Same as before, either throw any error or unpack the value returned |