diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-08-28 14:03:52 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-08-28 14:03:52 +0000 |
commit | 4d11115798b72d14794c2e05d0f28e6c60a6a593 (patch) | |
tree | 2aebc579837fe247970729c9a9cbb5aaed7eeff8 /cpukit/sapi | |
parent | 2007-07-31 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-4d11115798b72d14794c2e05d0f28e6c60a6a593.tar.bz2 |
2007-08-28 Joel Sherrill <joel.sherrill@OARcorp.com>
PR 1256/networking
* ftpd/ftpd.c, sapi/src/io.c: Fix unaligned access.
Diffstat (limited to 'cpukit/sapi')
-rw-r--r-- | cpukit/sapi/src/io.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/cpukit/sapi/src/io.c b/cpukit/sapi/src/io.c index 823427fd47..c989711535 100644 --- a/cpukit/sapi/src/io.c +++ b/cpukit/sapi/src/io.c @@ -136,15 +136,16 @@ rtems_status_code rtems_io_register_driver( if ( major == 0 ) { + bool found = FALSE; for ( major = _IO_Number_of_drivers - 1 ; major ; major-- ) if ( _IO_Driver_address_table[major].initialization_entry == 0 && - _IO_Driver_address_table[major].open_entry == 0 ) + _IO_Driver_address_table[major].open_entry == 0 ) { + found = FALSE; break; + } - if (( major == 0 ) && - ( _IO_Driver_address_table[major].initialization_entry == 0 && - _IO_Driver_address_table[major].open_entry == 0 )) - return RTEMS_TOO_MANY; + if ( !found ) + return RTEMS_TOO_MANY; } if ( _IO_Driver_address_table[major].initialization_entry == 0 && |