[rtems commit] termios: Simplify rtems_termios_read_tty()

Sebastian Huber sebh at rtems.org
Tue Feb 28 08:56:32 UTC 2017


Module:    rtems
Branch:    4.11
Commit:    35a3d81581954caedfbfcac1fb207d82a42b384b
Changeset: http://git.rtems.org/rtems/commit/?id=35a3d81581954caedfbfcac1fb207d82a42b384b

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Thu Feb 23 09:12:36 2017 +0100

termios: Simplify rtems_termios_read_tty()

Remove dead code.

Update #2914.

---

 cpukit/libcsupport/src/termios.c | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index d12f9c4..54b0121 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -1402,7 +1402,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;
@@ -1449,13 +1449,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;
@@ -1517,7 +1516,6 @@ fillBufferQueue (struct rtems_termios_tty *tty)
         break;
     }
   }
-  return RTEMS_SUCCESSFUL;
 }
 
 rtems_status_code
@@ -1544,12 +1542,9 @@ rtems_termios_read (void *arg)
     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++];




More information about the vc mailing list