Skip to content

Commit ef2efd2

Browse files
committed
[lldb] Remove 'result' variable which is set but not used (NFC)
1 parent 05fbe75 commit ef2efd2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lldb/tools/debugserver/source/TTYState.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,20 +39,19 @@ bool TTYState::GetTTYState(int fd, bool saveProcessGroup) {
3939
}
4040

4141
bool TTYState::SetTTYState() const {
42-
int result = 0;
4342
if (IsValid()) {
4443
if (TFlagsValid())
45-
result = fcntl(m_fd, F_SETFL, m_tflags);
44+
fcntl(m_fd, F_SETFL, m_tflags);
4645

4746
if (TTYStateValid())
48-
result = tcsetattr(m_fd, TCSANOW, &m_ttystate);
47+
tcsetattr(m_fd, TCSANOW, &m_ttystate);
4948

5049
if (ProcessGroupValid()) {
5150
// Save the original signal handler.
5251
void (*saved_sigttou_callback)(int) = NULL;
5352
saved_sigttou_callback = (void (*)(int))signal(SIGTTOU, SIG_IGN);
5453
// Set the process group
55-
result = tcsetpgrp(m_fd, m_processGroup);
54+
tcsetpgrp(m_fd, m_processGroup);
5655
// Restore the original signal handler.
5756
signal(SIGTTOU, saved_sigttou_callback);
5857
}

0 commit comments

Comments
 (0)