From d60c2d7943081e464be51ccf25977328980c10e0 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Thu, 23 Feb 2017 09:12:36 +0100 Subject: termios: Simplify rtems_termios_read_tty() Remove dead code. Update #2914. --- cpukit/libcsupport/src/termios.c | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 5067f6c465..f13e867f7d 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/termios.c @@ -1369,7 +1369,7 @@ siproc (unsigned char c, struct rtems_termios_tty *tty) /* * Fill the input buffer by polling the device */ -static rtems_status_code +static void fillBufferPoll (struct rtems_termios_tty *tty) { int n; @@ -1416,13 +1416,12 @@ fillBufferPoll (struct rtems_termios_tty *tty) } } } - return RTEMS_SUCCESSFUL; } /* * Fill the input buffer from the raw input queue */ -static rtems_status_code +static void fillBufferQueue (struct rtems_termios_tty *tty) { rtems_interval timeout = tty->rawInBufSemaphoreFirstTimeout; @@ -1484,7 +1483,6 @@ fillBufferQueue (struct rtems_termios_tty *tty) break; } } - return RTEMS_SUCCESSFUL; } static uint32_t @@ -1496,17 +1494,12 @@ rtems_termios_read_tty (struct rtems_termios_tty *tty, char *buffer, count = initial_count; if (tty->cindex == tty->ccount) { - rtems_status_code sc; - tty->cindex = tty->ccount = 0; tty->read_start_column = tty->column; if (tty->handler.poll_read != NULL && tty->handler.mode == TERMIOS_POLLED) - sc = fillBufferPoll (tty); + fillBufferPoll (tty); else - sc = fillBufferQueue (tty); - - if (sc != RTEMS_SUCCESSFUL) - tty->cindex = tty->ccount = 0; + fillBufferQueue (tty); } while (count && (tty->cindex < tty->ccount)) { *buffer++ = tty->cbuf[tty->cindex++]; -- cgit v1.2.3