diff options
author | Lioncash <mathew1800@gmail.com> | 2020-09-07 06:57:39 +0200 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2020-09-07 07:06:27 +0200 |
commit | cd643ab5c9f090f708c04f3b1db3c011e68415f8 (patch) | |
tree | cf7773960f41505a4f251093743318cba72ddc93 /src/core | |
parent | sockets_translate: Make use of designated initializers (diff) | |
download | yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.gz yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.bz2 yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.lz yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.xz yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.tar.zst yuzu-cd643ab5c9f090f708c04f3b1db3c011e68415f8.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/sockets/bsd.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 803505452..de6b150f7 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -491,7 +491,7 @@ std::pair<s32, Errno> BSD::PollImpl(std::vector<u8>& write_buffer, std::vector<u for (PollFD& pollfd : fds) { ASSERT(pollfd.revents == 0); - if (pollfd.fd > MAX_FD || pollfd.fd < 0) { + if (pollfd.fd > static_cast<s32>(MAX_FD) || pollfd.fd < 0) { LOG_ERROR(Service, "File descriptor handle={} is invalid", pollfd.fd); pollfd.revents = 0; return {0, Errno::SUCCESS}; @@ -795,7 +795,7 @@ s32 BSD::FindFreeFileDescriptorHandle() noexcept { } bool BSD::IsFileDescriptorValid(s32 fd) const noexcept { - if (fd > MAX_FD || fd < 0) { + if (fd > static_cast<s32>(MAX_FD) || fd < 0) { LOG_ERROR(Service, "Invalid file descriptor handle={}", fd); return false; } @@ -809,7 +809,7 @@ bool BSD::IsFileDescriptorValid(s32 fd) const noexcept { bool BSD::IsBlockingSocket(s32 fd) const noexcept { // Inform invalid sockets as non-blocking // This way we avoid using a worker thread as it will fail without blocking host - if (fd > MAX_FD || fd < 0) { + if (fd > static_cast<s32>(MAX_FD) || fd < 0) { return false; } if (!file_descriptors[fd]) { |