Changeset 681d4526 in rtems


Ignore:
Timestamp:
Oct 10, 2009, 3:19:15 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
6805ac37
Parents:
2f95352c
Message:

2009-10-10 Joel Sherrill <joel.sherrill@…>

  • score/inline/rtems/score/object.inl: _Objects_Get_local_object() is only called from places where the index is known to be valid. _Objects_Set_local_object() already assumed this. Eliminates unreachable code.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    r2f95352c r681d4526  
     12009-10-10      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * score/inline/rtems/score/object.inl: _Objects_Get_local_object() is
     4        only called from places where the index is known to be valid.
     5        _Objects_Set_local_object() already assumed this. Eliminates
     6        unreachable code.
     7
    182009-10-10      Joel Sherrill <joel.sherrill@oarcorp.com>
    29
  • cpukit/score/inline/rtems/score/object.inl

    r2f95352c r681d4526  
    199199 *
    200200 *  @return This method returns a pointer to a local object or NULL if the
    201  *          index is invalid.
     201 *          index is invalid and RTEMS_DEBUG is enabled.
    202202 */
    203203RTEMS_INLINE_ROUTINE Objects_Control *_Objects_Get_local_object(
     
    206206)
    207207{
    208   if ( index > information->maximum )
    209     return NULL;
     208  /*
     209   *  This routine is ONLY to be called from places in the code
     210   *  where the Id is known to be good.  Therefore, this should NOT
     211   *  occur in normal situations.
     212   */
     213  #if defined(RTEMS_DEBUG)
     214    if ( index > information->maximum )
     215      return NULL;
     216  #endif
    210217  return information->local_table[ index ];
    211218}
Note: See TracChangeset for help on using the changeset viewer.