summaryrefslogtreecommitdiff
path: root/source/Commands/CommandObjectQuit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/Commands/CommandObjectQuit.cpp')
-rw-r--r--source/Commands/CommandObjectQuit.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/source/Commands/CommandObjectQuit.cpp b/source/Commands/CommandObjectQuit.cpp
index 37ed12be358f..2c5b20bf5846 100644
--- a/source/Commands/CommandObjectQuit.cpp
+++ b/source/Commands/CommandObjectQuit.cpp
@@ -9,10 +9,6 @@
#include "CommandObjectQuit.h"
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
#include "lldb/Interpreter/CommandInterpreter.h"
#include "lldb/Interpreter/CommandReturnObject.h"
#include "lldb/Target/Process.h"
@@ -35,7 +31,7 @@ CommandObjectQuit::~CommandObjectQuit() {}
// if all alive processes will be detached when you quit and false if at least
// one process will be killed instead
bool CommandObjectQuit::ShouldAskForConfirmation(bool &is_a_detach) {
- if (m_interpreter.GetPromptOnQuit() == false)
+ if (!m_interpreter.GetPromptOnQuit())
return false;
bool should_prompt = false;
is_a_detach = true;
@@ -55,7 +51,7 @@ bool CommandObjectQuit::ShouldAskForConfirmation(bool &is_a_detach) {
if (process_sp && process_sp->IsValid() && process_sp->IsAlive() &&
process_sp->WarnBeforeDetach()) {
should_prompt = true;
- if (process_sp->GetShouldDetach() == false) {
+ if (!process_sp->GetShouldDetach()) {
// if we need to kill at least one process, just say so and return
is_a_detach = false;
return should_prompt;
@@ -86,13 +82,6 @@ bool CommandObjectQuit::DoExecute(Args &command, CommandReturnObject &result) {
return false;
}
- if (command.GetArgumentCount() > 1) {
- result.AppendError("Too many arguments for 'quit'. Only an optional exit "
- "code is allowed");
- result.SetStatus(eReturnStatusFailed);
- return false;
- }
-
// We parse the exit code argument if there is one.
if (command.GetArgumentCount() == 1) {
llvm::StringRef arg = command.GetArgumentAtIndex(0);