diff options
Diffstat (limited to 'cpukit/score/src')
-rw-r--r-- | cpukit/score/src/objectgetnext.c | 9 | ||||
-rw-r--r-- | cpukit/score/src/objectgetnoprotection.c | 7 |
2 files changed, 7 insertions, 9 deletions
diff --git a/cpukit/score/src/objectgetnext.c b/cpukit/score/src/objectgetnext.c index 544ded7000..c0ebbbed98 100644 --- a/cpukit/score/src/objectgetnext.c +++ b/cpukit/score/src/objectgetnext.c @@ -28,7 +28,7 @@ _Objects_Get_next( Objects_Id *next_id_p ) { - Objects_Control *object; + Objects_Control *the_object; Objects_Id next_id; if ( !information ) @@ -58,12 +58,13 @@ _Objects_Get_next( } /* try to grab one */ - object = _Objects_Get_no_protection(information, next_id, location_p); + the_object = _Objects_Get_no_protection( information, next_id ); next_id++; - } while (*location_p != OBJECTS_LOCAL); + } while ( the_object == NULL ); + *location_p = OBJECTS_LOCAL; *next_id_p = next_id; - return object; + return the_object; } diff --git a/cpukit/score/src/objectgetnoprotection.c b/cpukit/score/src/objectgetnoprotection.c index aebe6c798a..eaa172c83b 100644 --- a/cpukit/score/src/objectgetnoprotection.c +++ b/cpukit/score/src/objectgetnoprotection.c @@ -21,9 +21,8 @@ #include <rtems/score/objectimpl.h> Objects_Control *_Objects_Get_no_protection( - Objects_Information *information, - Objects_Id id, - Objects_Locations *location + const Objects_Information *information, + Objects_Id id ) { Objects_Control *the_object; @@ -37,7 +36,6 @@ Objects_Control *_Objects_Get_no_protection( if ( information->maximum >= index ) { if ( (the_object = information->local_table[ index ]) != NULL ) { - *location = OBJECTS_LOCAL; return the_object; } } @@ -46,6 +44,5 @@ Objects_Control *_Objects_Get_no_protection( * This isn't supported or required yet for Global objects so * if it isn't local, we don't find it. */ - *location = OBJECTS_ERROR; return NULL; } |