summaryrefslogtreecommitdiffstats
path: root/c
diff options
context:
space:
mode:
authorJennifer Averett <Jennifer.Averett@OARcorp.com>1999-03-29 18:24:34 +0000
committerJennifer Averett <Jennifer.Averett@OARcorp.com>1999-03-29 18:24:34 +0000
commit77c81fd2a1dedce6aad36204cf9ddbaf794c4f2f (patch)
tree93537553df3561b01a0537ff3b246dd07ce6f185 /c
parentCorrectd name length to account for new IMFS max name length of 32. (diff)
downloadrtems-77c81fd2a1dedce6aad36204cf9ddbaf794c4f2f.tar.bz2
Removed an uninitialized variable.
Diffstat (limited to 'c')
-rw-r--r--c/src/exec/libcsupport/src/libio.c9
-rw-r--r--c/src/lib/libc/libio.c9
2 files changed, 10 insertions, 8 deletions
diff --git a/c/src/exec/libcsupport/src/libio.c b/c/src/exec/libcsupport/src/libio.c
index ccf95fdb4e..9b8b1e1948 100644
--- a/c/src/exec/libcsupport/src/libio.c
+++ b/c/src/exec/libcsupport/src/libio.c
@@ -46,7 +46,6 @@
extern unsigned32 rtems_libio_number_iops;
rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
-rtems_libio_t *rtems_libio_last_iop;
rtems_libio_t *rtems_libio_iop_freelist;
/*
@@ -236,6 +235,7 @@ void rtems_libio_free(
if (iop->sem)
rtems_semaphore_delete(iop->sem);
+ iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
@@ -259,6 +259,7 @@ int rtems_libio_is_open_files_in_fs(
{
rtems_libio_t *iop;
int result = 0;
+ int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
@@ -266,7 +267,7 @@ int rtems_libio_is_open_files_in_fs(
* Look for any active file descriptor entry.
*/
- for ( iop=rtems_libio_iops ; iop <= rtems_libio_last_iop ; iop++ ) {
+ for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
@@ -302,6 +303,7 @@ int rtems_libio_is_file_open(
{
rtems_libio_t *iop;
int result=0;
+ int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
@@ -309,8 +311,7 @@ int rtems_libio_is_file_open(
* Look for any active file descriptor entry.
*/
- for ( iop=rtems_libio_iops ; iop <= rtems_libio_last_iop ; iop++ ) {
-
+ for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
/*
diff --git a/c/src/lib/libc/libio.c b/c/src/lib/libc/libio.c
index ccf95fdb4e..9b8b1e1948 100644
--- a/c/src/lib/libc/libio.c
+++ b/c/src/lib/libc/libio.c
@@ -46,7 +46,6 @@
extern unsigned32 rtems_libio_number_iops;
rtems_id rtems_libio_semaphore;
rtems_libio_t *rtems_libio_iops;
-rtems_libio_t *rtems_libio_last_iop;
rtems_libio_t *rtems_libio_iop_freelist;
/*
@@ -236,6 +235,7 @@ void rtems_libio_free(
if (iop->sem)
rtems_semaphore_delete(iop->sem);
+ iop->flags &= ~LIBIO_FLAGS_OPEN;
iop->data1 = rtems_libio_iop_freelist;
rtems_libio_iop_freelist = iop;
@@ -259,6 +259,7 @@ int rtems_libio_is_open_files_in_fs(
{
rtems_libio_t *iop;
int result = 0;
+ int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
@@ -266,7 +267,7 @@ int rtems_libio_is_open_files_in_fs(
* Look for any active file descriptor entry.
*/
- for ( iop=rtems_libio_iops ; iop <= rtems_libio_last_iop ; iop++ ) {
+ for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
@@ -302,6 +303,7 @@ int rtems_libio_is_file_open(
{
rtems_libio_t *iop;
int result=0;
+ int i;
rtems_semaphore_obtain( rtems_libio_semaphore, RTEMS_WAIT, RTEMS_NO_TIMEOUT );
@@ -309,8 +311,7 @@ int rtems_libio_is_file_open(
* Look for any active file descriptor entry.
*/
- for ( iop=rtems_libio_iops ; iop <= rtems_libio_last_iop ; iop++ ) {
-
+ for (iop=rtems_libio_iops,i=0; i <= rtems_libio_number_iops; iop++, i++){
if ((iop->flags & LIBIO_FLAGS_OPEN) != 0) {
/*