forked from Imagelibrary/rtems
Modified _Objects_Is_class_valid() to correctly report that 0 was
not a valid object class. This was discovered while looking for a bug reported by Jennifer.
This commit is contained in:
@@ -101,7 +101,7 @@ RTEMS_INLINE_ROUTINE boolean _Objects_Is_class_valid(
|
||||
Objects_Classes the_class
|
||||
)
|
||||
{
|
||||
return the_class <= OBJECTS_CLASSES_LAST;
|
||||
return the_class && the_class <= OBJECTS_CLASSES_LAST;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
|
||||
@@ -101,7 +101,7 @@ RTEMS_INLINE_ROUTINE boolean _Objects_Is_class_valid(
|
||||
Objects_Classes the_class
|
||||
)
|
||||
{
|
||||
return the_class <= OBJECTS_CLASSES_LAST;
|
||||
return the_class && the_class <= OBJECTS_CLASSES_LAST;
|
||||
}
|
||||
|
||||
/*PAGE
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#define _Objects_Is_class_valid( _the_class ) \
|
||||
( (_the_class) <= OBJECTS_CLASSES_LAST )
|
||||
( (_the_class) && (_the_class) <= OBJECTS_CLASSES_LAST )
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
*/
|
||||
|
||||
#define _Objects_Is_class_valid( _the_class ) \
|
||||
( (_the_class) <= OBJECTS_CLASSES_LAST )
|
||||
( (_the_class) && (_the_class) <= OBJECTS_CLASSES_LAST )
|
||||
|
||||
/*PAGE
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user