[Lldb-commits] [PATCH] D116768: Fix setting of success in Socket::Close()
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 7 12:43:09 PST 2022
This revision was automatically updated to reflect the committed changes.
Closed by commit rG4f6d3a376c9f: [LLDB] Fix setting of success in Socket::Close() (authored by shafik).
Herald added a project: LLDB.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D116768/new/
https://reviews.llvm.org/D116768
Files:
lldb/source/Host/common/Socket.cpp
Index: lldb/source/Host/common/Socket.cpp
===================================================================
--- lldb/source/Host/common/Socket.cpp
+++ lldb/source/Host/common/Socket.cpp
@@ -281,9 +281,9 @@
static_cast<void *>(this), static_cast<uint64_t>(m_socket));
#if defined(_WIN32)
- bool success = !!closesocket(m_socket);
+ bool success = closesocket(m_socket) == 0;
#else
- bool success = !!::close(m_socket);
+ bool success = ::close(m_socket) == 0;
#endif
// A reference to a FD was passed in, set it to an invalid value
m_socket = kInvalidSocketValue;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116768.398218.patch
Type: text/x-patch
Size: 593 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20220107/36bb6809/attachment.bin>
More information about the lldb-commits
mailing list