[llvm] 5e150bb - [Support] Remove an unnecessary cast (NFC) (#151083)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 29 08:19:05 PDT 2025
Author: Kazu Hirata
Date: 2025-07-29T08:19:01-07:00
New Revision: 5e150bb78185b424a8e6e01aa2c4907dde409777
URL: https://github.com/llvm/llvm-project/commit/5e150bb78185b424a8e6e01aa2c4907dde409777
DIFF: https://github.com/llvm/llvm-project/commit/5e150bb78185b424a8e6e01aa2c4907dde409777.diff
LOG: [Support] Remove an unnecessary cast (NFC) (#151083)
NumRead is already of ssize_t.
Added:
Modified:
llvm/lib/Support/Unix/Path.inc
Removed:
################################################################################
diff --git a/llvm/lib/Support/Unix/Path.inc b/llvm/lib/Support/Unix/Path.inc
index 277247e3cc236..cc02cae40ec76 100644
--- a/llvm/lib/Support/Unix/Path.inc
+++ b/llvm/lib/Support/Unix/Path.inc
@@ -1190,7 +1190,7 @@ Expected<size_t> readNativeFile(file_t FD, MutableArrayRef<char> Buf) {
size_t Size = Buf.size();
#endif
ssize_t NumRead = sys::RetryAfterSignal(-1, ::read, FD, Buf.data(), Size);
- if (ssize_t(NumRead) == -1)
+ if (NumRead == -1)
return errorCodeToError(errnoAsErrorCode());
// The underlying operation on these platforms allow opening directories
// for reading in more cases than other platforms.
More information about the llvm-commits
mailing list