summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/IOHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/IOHandler.cpp')
-rw-r--r--lldb/source/Core/IOHandler.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lldb/source/Core/IOHandler.cpp b/lldb/source/Core/IOHandler.cpp
index a95e4c17f08..5394f16b7f9 100644
--- a/lldb/source/Core/IOHandler.cpp
+++ b/lldb/source/Core/IOHandler.cpp
@@ -172,12 +172,9 @@ IOHandlerConfirm::~IOHandlerConfirm() = default;
void IOHandlerConfirm::IOHandlerComplete(IOHandler &io_handler,
CompletionRequest &request) {
- if (request.GetRawCursorPos() == 0) {
- if (m_default_response)
- request.AddCompletion("y");
- else
- request.AddCompletion("n");
- }
+ if (request.GetRawCursorPos() != 0)
+ return;
+ request.AddCompletion(m_default_response ? "y" : "n");
}
void IOHandlerConfirm::IOHandlerInputComplete(IOHandler &io_handler,
OpenPOWER on IntegriCloud