diff options
author | Jade Lovelace <lix@jade.fyi> | 2024-08-04 22:03:35 -0700 |
---|---|---|
committer | Jade Lovelace <lix@jade.fyi> | 2024-08-08 14:53:17 -0700 |
commit | a85c4ce535c940bd2f48c34ab823fb3a8f5be0cc (patch) | |
tree | b1a428e5d41a3c9bd208f30bd00b99ebf0030967 /src/libutil/file-descriptor.cc | |
parent | c1291fd102ed88ba8e1df63e5b2ae6fa94c73188 (diff) |
tree-wide: automated migration to charptr_cast
The lint did it :3
Change-Id: I2d9f276b01ebbf14101de4257ea13e44ff6fe0a0
Diffstat (limited to 'src/libutil/file-descriptor.cc')
-rw-r--r-- | src/libutil/file-descriptor.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libutil/file-descriptor.cc b/src/libutil/file-descriptor.cc index 7c82988b3..be9f8c889 100644 --- a/src/libutil/file-descriptor.cc +++ b/src/libutil/file-descriptor.cc @@ -1,3 +1,4 @@ +#include "charptr-cast.hh" #include "file-system.hh" #include "finally.hh" #include "logging.hh" @@ -115,7 +116,7 @@ Generator<Bytes> drainFDSource(int fd, bool block) throw SysError("reading from file"); } else if (rd == 0) break; - else co_yield std::span{reinterpret_cast<char *>(buf.data()), (size_t) rd}; + else co_yield std::span{charptr_cast<char *>(buf.data()), (size_t) rd}; } } |