[libc-commits] [PATCH] D139576: [libc] move errno out of file internals

Michael Jones via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Dec 9 14:45:33 PST 2022


michaelrj marked 4 inline comments as done.
michaelrj added inline comments.


================
Comment at: libc/src/__support/File/file.h:56
+  using CloseFunc = FileResult<int>(File *);
+  using FlushFunc = FileResult<int>(File *);
 
----------------
sivachandra wrote:
> The close and flush operation functions can return the error value directly. Call sites will detect an error if they see a non-zero return value.
close and flush call write, meaning that they can theoretically have any error that write can, not just EBADF.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139576/new/

https://reviews.llvm.org/D139576



More information about the libc-commits mailing list