diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-08-21 12:52:08 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1998-08-21 12:52:08 +0000 |
commit | bbdab895636a66564f9c737d80fb575ab2782e68 (patch) | |
tree | 625a92104d9fede8db94377e57aa6ef96ce08429 /cpukit/libcsupport/src | |
parent | Fixed warning about pointer/integer conversion which turned out to be (diff) | |
download | rtems-bbdab895636a66564f9c737d80fb575ab2782e68.tar.bz2 |
Added initialization of missing termios structure entries.
Diffstat (limited to 'cpukit/libcsupport/src')
-rw-r--r-- | cpukit/libcsupport/src/termios.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c index 4059b544bd..e7fcf8ee30 100644 --- a/cpukit/libcsupport/src/termios.c +++ b/cpukit/libcsupport/src/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 |