Skip to content

Commit

Permalink
[lldb] Remove 'result' variable which is set but not used (NFC)
Browse files Browse the repository at this point in the history
  • Loading branch information
JDevlieghere committed Nov 6, 2021
1 parent 05fbe75 commit ef2efd2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lldb/tools/debugserver/source/TTYState.cpp
Expand Up @@ -39,20 +39,19 @@ bool TTYState::GetTTYState(int fd, bool saveProcessGroup) {
}

bool TTYState::SetTTYState() const {
int result = 0;
if (IsValid()) {
if (TFlagsValid())
result = fcntl(m_fd, F_SETFL, m_tflags);
fcntl(m_fd, F_SETFL, m_tflags);

if (TTYStateValid())
result = tcsetattr(m_fd, TCSANOW, &m_ttystate);
tcsetattr(m_fd, TCSANOW, &m_ttystate);

if (ProcessGroupValid()) {
// Save the original signal handler.
void (*saved_sigttou_callback)(int) = NULL;
saved_sigttou_callback = (void (*)(int))signal(SIGTTOU, SIG_IGN);
// Set the process group
result = tcsetpgrp(m_fd, m_processGroup);
tcsetpgrp(m_fd, m_processGroup);
// Restore the original signal handler.
signal(SIGTTOU, saved_sigttou_callback);
}
Expand Down

0 comments on commit ef2efd2

Please sign in to comment.