[libc-commits] [libc] [libc] Fix copy/paste error in file.cpp (PR #150802)
via libc-commits
libc-commits at lists.llvm.org
Sat Jul 26 14:38:43 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (codefaber)
<details>
<summary>Changes</summary>
Fix using wrong variable due to copy/paste error.
---
Full diff: https://github.com/llvm/llvm-project/pull/150802.diff
1 Files Affected:
- (modified) libc/src/__support/File/file.cpp (+1-1)
``````````diff
diff --git a/libc/src/__support/File/file.cpp b/libc/src/__support/File/file.cpp
index 303852dbbb717..4217e73828388 100644
--- a/libc/src/__support/File/file.cpp
+++ b/libc/src/__support/File/file.cpp
@@ -123,7 +123,7 @@ FileIOResult File::write_unlocked_fbf(const uint8_t *data, size_t len) {
FileIOResult result =
platform_write(this, remainder.data(), remainder.size());
- size_t bytes_written = buf_result.value;
+ size_t bytes_written = result.value;
// If less bytes were written than expected, then an error occurred. Return
// the number of bytes that have been written from |data|.
``````````
</details>
https://github.com/llvm/llvm-project/pull/150802
More information about the libc-commits
mailing list