summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-16 15:37:20 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-01-16 15:37:20 +0000
commit3a7782b09e19bad22e5d48d20d9c5703c35d6f6e (patch)
treea12fd0c44587355118a266c6c732402d809986dd
parentecacc1196cc1a1c6b1f7710a2388c53cff3673c0 (diff)
downloadrtems-3a7782b09e19bad22e5d48d20d9c5703c35d6f6e.tar.bz2
Jennifer found some uninitialized variables:
+ major and minor number elements in rtems_termios_open. + arg->ioctl_return in rtems_termios_ioctl routine.
-rw-r--r--c/src/exec/libcsupport/src/termios.c8
-rw-r--r--c/src/lib/libc/termios.c8
-rw-r--r--cpukit/libcsupport/src/termios.c8
3 files changed, 21 insertions, 3 deletions
diff --git a/c/src/exec/libcsupport/src/termios.c b/c/src/exec/libcsupport/src/termios.c
index 4083d72960..8512fd6e14 100644
--- a/c/src/exec/libcsupport/src/termios.c
+++ b/c/src/exec/libcsupport/src/termios.c
@@ -207,6 +207,9 @@ rtems_termios_open (
if (ttyTail == NULL)
ttyTail = tty;
+ tty->minor = minor;
+ tty->major = major;
+
/*
* Set up mutex semaphores
*/
@@ -343,8 +346,10 @@ rtems_termios_ioctl (void *arg)
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
+ if (sc != RTEMS_SUCCESSFUL) {
+ args->ioctl_return = sc;
return sc;
+ }
switch (args->command) {
default:
sc = RTEMS_INVALID_NUMBER;
@@ -387,6 +392,7 @@ rtems_termios_ioctl (void *arg)
break;
}
rtems_semaphore_release (tty->osem);
+ args->ioctl_return = sc;
return sc;
}
diff --git a/c/src/lib/libc/termios.c b/c/src/lib/libc/termios.c
index 4083d72960..8512fd6e14 100644
--- a/c/src/lib/libc/termios.c
+++ b/c/src/lib/libc/termios.c
@@ -207,6 +207,9 @@ rtems_termios_open (
if (ttyTail == NULL)
ttyTail = tty;
+ tty->minor = minor;
+ tty->major = major;
+
/*
* Set up mutex semaphores
*/
@@ -343,8 +346,10 @@ rtems_termios_ioctl (void *arg)
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
+ if (sc != RTEMS_SUCCESSFUL) {
+ args->ioctl_return = sc;
return sc;
+ }
switch (args->command) {
default:
sc = RTEMS_INVALID_NUMBER;
@@ -387,6 +392,7 @@ rtems_termios_ioctl (void *arg)
break;
}
rtems_semaphore_release (tty->osem);
+ args->ioctl_return = sc;
return sc;
}
diff --git a/cpukit/libcsupport/src/termios.c b/cpukit/libcsupport/src/termios.c
index 4083d72960..8512fd6e14 100644
--- a/cpukit/libcsupport/src/termios.c
+++ b/cpukit/libcsupport/src/termios.c
@@ -207,6 +207,9 @@ rtems_termios_open (
if (ttyTail == NULL)
ttyTail = tty;
+ tty->minor = minor;
+ tty->major = major;
+
/*
* Set up mutex semaphores
*/
@@ -343,8 +346,10 @@ rtems_termios_ioctl (void *arg)
args->ioctl_return = 0;
sc = rtems_semaphore_obtain (tty->osem, RTEMS_WAIT, RTEMS_NO_TIMEOUT);
- if (sc != RTEMS_SUCCESSFUL)
+ if (sc != RTEMS_SUCCESSFUL) {
+ args->ioctl_return = sc;
return sc;
+ }
switch (args->command) {
default:
sc = RTEMS_INVALID_NUMBER;
@@ -387,6 +392,7 @@ rtems_termios_ioctl (void *arg)
break;
}
rtems_semaphore_release (tty->osem);
+ args->ioctl_return = sc;
return sc;
}