Skip to content

Commit 5e150bb

Browse files
[Support] Remove an unnecessary cast (NFC) (#151083)
NumRead is already of ssize_t.
1 parent 84576c7 commit 5e150bb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Support/Unix/Path.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1190,7 +1190,7 @@ Expected<size_t> readNativeFile(file_t FD, MutableArrayRef<char> Buf) {
11901190
size_t Size = Buf.size();
11911191
#endif
11921192
ssize_t NumRead = sys::RetryAfterSignal(-1, ::read, FD, Buf.data(), Size);
1193-
if (ssize_t(NumRead) == -1)
1193+
if (NumRead == -1)
11941194
return errorCodeToError(errnoAsErrorCode());
11951195
// The underlying operation on these platforms allow opening directories
11961196
// for reading in more cases than other platforms.

0 commit comments

Comments
 (0)