Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/windirstat/llfio.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'include/llfio/v2.0/detail/impl/posix/file_handle.ipp')
-rw-r--r--include/llfio/v2.0/detail/impl/posix/file_handle.ipp8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/llfio/v2.0/detail/impl/posix/file_handle.ipp b/include/llfio/v2.0/detail/impl/posix/file_handle.ipp
index 7972f16b..7e67f193 100644
--- a/include/llfio/v2.0/detail/impl/posix/file_handle.ipp
+++ b/include/llfio/v2.0/detail/impl/posix/file_handle.ipp
@@ -464,7 +464,7 @@ result<file_handle::extent_type> file_handle::zero(file_handle::extent_type offs
auto *buffer = static_cast<byte *>(alloca(bytes));
memset(buffer, 0, bytes);
OUTCOME_TRY(written, write(offset, {{buffer, bytes}}, d));
- return written[0].size();
+ return written;
}
try
{
@@ -477,9 +477,9 @@ result<file_handle::extent_type> file_handle::zero(file_handle::extent_type offs
{
auto towrite = (bytes < blocksize) ? bytes : blocksize;
OUTCOME_TRY(written, write(offset, {{buffer, towrite}}, d));
- offset += written[0].size();
- bytes -= written[0].size();
- ret += written[0].size();
+ offset += written;
+ bytes -= written;
+ ret += written;
}
return ret;
}