Patch the following issues found by static code inspection:
- Unchecked return values from lib calls
- Passing potentially negative arg into a function that requires non-negative input
- Possible socket double-close
Paths
| Differential D131294
[LLDB][NFC] Reliability fixes to TCPSocket code ClosedPublic Authored by fixathon on Aug 5 2022, 2:02 PM.
Details Summary Patch the following issues found by static code inspection:
Diff Detail
Event TimelineThis revision is now accepted and ready to land.Aug 6 2022, 11:04 PM Closed by commit rGaa4977f2e135: [LLDB][NFC] Reliability fixes to TCPSocket code (authored by fixathon). · Explain WhyAug 6 2022, 11:07 PM This revision was automatically updated to reflect the committed changes. Comment Actions We don't use the constant first so you don't accidentally use "=" rather than "==" convention anywhere else in lldb, so it looks weird here. Comment Actions
Good feedback. I'll switch that around. On second thought, this very file has numerous instances of "constant first" style, ex: (-1 == expression), so this is consistent with the current style of this file. Would you still like the style adjusted?
Revision Contents
Diff 450598 lldb/source/Host/common/TCPSocket.cpp
|