[Lldb-commits] [lldb] bd21257 - [lldb] [Host] Fix flipped logic in TerminalState::Save()

Michał Górny via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 1 09:24:01 PDT 2021


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)


        


More information about the lldb-commits mailing list