forked from OSchip/llvm-project
[lldb] Remove 'result' variable which is set but not used (NFC)
This commit is contained in:
parent
05fbe75890
commit
ef2efd2553
|
@ -39,20 +39,19 @@ bool TTYState::GetTTYState(int fd, bool saveProcessGroup) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TTYState::SetTTYState() const {
|
bool TTYState::SetTTYState() const {
|
||||||
int result = 0;
|
|
||||||
if (IsValid()) {
|
if (IsValid()) {
|
||||||
if (TFlagsValid())
|
if (TFlagsValid())
|
||||||
result = fcntl(m_fd, F_SETFL, m_tflags);
|
fcntl(m_fd, F_SETFL, m_tflags);
|
||||||
|
|
||||||
if (TTYStateValid())
|
if (TTYStateValid())
|
||||||
result = tcsetattr(m_fd, TCSANOW, &m_ttystate);
|
tcsetattr(m_fd, TCSANOW, &m_ttystate);
|
||||||
|
|
||||||
if (ProcessGroupValid()) {
|
if (ProcessGroupValid()) {
|
||||||
// Save the original signal handler.
|
// Save the original signal handler.
|
||||||
void (*saved_sigttou_callback)(int) = NULL;
|
void (*saved_sigttou_callback)(int) = NULL;
|
||||||
saved_sigttou_callback = (void (*)(int))signal(SIGTTOU, SIG_IGN);
|
saved_sigttou_callback = (void (*)(int))signal(SIGTTOU, SIG_IGN);
|
||||||
// Set the process group
|
// Set the process group
|
||||||
result = tcsetpgrp(m_fd, m_processGroup);
|
tcsetpgrp(m_fd, m_processGroup);
|
||||||
// Restore the original signal handler.
|
// Restore the original signal handler.
|
||||||
signal(SIGTTOU, saved_sigttou_callback);
|
signal(SIGTTOU, saved_sigttou_callback);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue