From: Jonas Devlieghere Date: Wed, 3 Jun 2020 04:21:20 +0000 (-0700) Subject: [lldb/Interpreter] Remove redundant argument (NFC) X-Git-Tag: llvmorg-12-init~4335 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=def72b91950d44a68b8613f25fa1a09926171222;p=platform%2Fupstream%2Fllvm.git [lldb/Interpreter] Remove redundant argument (NFC) --- diff --git a/lldb/source/Interpreter/CommandReturnObject.cpp b/lldb/source/Interpreter/CommandReturnObject.cpp index efeac6d..a0ede45 100644 --- a/lldb/source/Interpreter/CommandReturnObject.cpp +++ b/lldb/source/Interpreter/CommandReturnObject.cpp @@ -14,12 +14,9 @@ using namespace lldb; using namespace lldb_private; -static void DumpStringToStreamWithNewline(Stream &strm, const std::string &s, - bool add_newline_if_empty) { +static void DumpStringToStreamWithNewline(Stream &strm, const std::string &s) { bool add_newline = false; - if (s.empty()) { - add_newline = add_newline_if_empty; - } else { + if (!s.empty()) { // We already checked for empty above, now make sure there is a newline in // the error, and if there isn't one, add one. strm.Write(s.c_str(), s.size()); @@ -50,7 +47,7 @@ void CommandReturnObject::AppendErrorWithFormat(const char *format, ...) { if (!s.empty()) { Stream &error_strm = GetErrorStream(); error_strm.PutCString("error: "); - DumpStringToStreamWithNewline(error_strm, s, false); + DumpStringToStreamWithNewline(error_strm, s); } }