summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libc/termios.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 12:52:08 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-08-21 12:52:08 +0000
commitbbdab895636a66564f9c737d80fb575ab2782e68 (patch)
tree625a92104d9fede8db94377e57aa6ef96ce08429 /c/src/lib/libc/termios.c
parentFixed warning about pointer/integer conversion which turned out to be (diff)
downloadrtems-bbdab895636a66564f9c737d80fb575ab2782e68.tar.bz2
Added initialization of missing termios structure entries.
Diffstat (limited to 'c/src/lib/libc/termios.c')
-rw-r--r--c/src/lib/libc/termios.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/c/src/lib/libc/termios.c b/c/src/lib/libc/termios.c
index 4059b544bd..e7fcf8ee30 100644
--- a/c/src/lib/libc/termios.c
+++ b/c/src/lib/libc/termios.c
@@ -206,7 +206,7 @@ rtems_termios_open (
/*
* Create a new device
*/
- tty = malloc (sizeof (struct rtems_termios_tty));
+ tty = calloc (1, sizeof (struct rtems_termios_tty));
if (tty == NULL) {
rtems_semaphore_release (ttyMutex);
return RTEMS_NO_MEMORY;
@@ -219,7 +219,6 @@ rtems_termios_open (
tty->minor = minor;
tty->major = major;
- tty->refcount = 0;
/*
* Set up mutex semaphores
@@ -250,6 +249,8 @@ rtems_termios_open (
rtems_fatal_error_occurred (sc);
tty->rawOutBufHead = 0;
tty->rawOutBufTail = 0;
+ tty->refcount = 0;
+ tty->rawOutBufState = rob_idle;
/*
* Set callbacks