Author: Michał Górny Date: 2021-10-01T18:23:54+02:00 New Revision: bd21257bf5af211c4d269ddbec0911c76c3b6120
URL: https://github.com/llvm/llvm-project/commit/bd21257bf5af211c4d269ddbec0911c76c3b6120 DIFF: https://github.com/llvm/llvm-project/commit/bd21257bf5af211c4d269ddbec0911c76c3b6120.diff LOG: [lldb] [Host] Fix flipped logic in TerminalState::Save() Added: Modified: lldb/source/Host/common/Terminal.cpp Removed: ################################################################################ diff --git a/lldb/source/Host/common/Terminal.cpp b/lldb/source/Host/common/Terminal.cpp index 6adcfa6a92c4..2be9a6d6b0ec 100644 --- a/lldb/source/Host/common/Terminal.cpp +++ b/lldb/source/Host/common/Terminal.cpp @@ -110,7 +110,7 @@ bool TerminalState::Save(Terminal term, bool save_process_group) { m_tflags = ::fcntl(fd, F_GETFL, 0); #if LLDB_ENABLE_TERMIOS std::unique_ptr<Data> new_data{new Data()}; - if (::tcgetattr(fd, &new_data->m_termios) != 0) + if (::tcgetattr(fd, &new_data->m_termios) == 0) m_data = std::move(new_data); #endif // LLDB_ENABLE_TERMIOS if (save_process_group) _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits