summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-22 15:34:48 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2018-02-22 15:35:20 +0100
commit5618997dfd0bec9393d510aa5a058b5c65b11e6f (patch)
tree2c42cabb56f61269165f1e4d82f4d03ac1437ed4
parentpowerpc/shared/startup/linkcmds.base: Add wildcards on some sections (diff)
downloadrtems-5618997dfd0bec9393d510aa5a058b5c65b11e6f.tar.bz2
termios: Fix use of uninitialized variable
Update #2840.
-rw-r--r--cpukit/libcsupport/src/termios.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index 0389ec37b2..2492efbaba 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -372,8 +372,6 @@ rtems_termios_open_tty(
const rtems_termios_callbacks *callbacks
)
{
- rtems_status_code sc;
-
if (tty == NULL) {
static char c = 'a';
rtems_termios_device_context *ctx;
@@ -490,6 +488,8 @@ rtems_termios_open_tty(
* Create I/O tasks
*/
if (tty->handler.mode == TERMIOS_TASK_DRIVEN) {
+ rtems_status_code sc;
+
sc = rtems_task_create (
rtems_build_name ('T', 'x', 'T', c),
TERMIOS_TXTASK_PRIO,
@@ -516,8 +516,6 @@ rtems_termios_open_tty(
(tty->handler.mode == TERMIOS_TASK_DRIVEN)){
rtems_binary_semaphore_init (&tty->rawInBuf.Semaphore,
"termios raw input");
- if (sc != RTEMS_SUCCESSFUL)
- rtems_fatal_error_occurred (sc);
}
/*
@@ -573,6 +571,8 @@ rtems_termios_open_tty(
* start I/O tasks, if needed
*/
if (tty->handler.mode == TERMIOS_TASK_DRIVEN) {
+ rtems_status_code sc;
+
sc = rtems_task_start(
tty->rxTaskId, rtems_termios_rxdaemon, (rtems_task_argument)tty);
if (sc != RTEMS_SUCCESSFUL)