summaryrefslogtreecommitdiffstats
path: root/c/src/exec/score
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1998-06-18 18:58:42 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1998-06-18 18:58:42 +0000
commit7e4c3d8b1d199ca3f72341aba9e1916f0cd78257 (patch)
tree7114d95a96d639725ab09ec738a926a622a06d72 /c/src/exec/score
parentAdded freebsd support from Dario Alcocer <alcocer@connectnet.com>. (diff)
downloadrtems-7e4c3d8b1d199ca3f72341aba9e1916f0cd78257.tar.bz2
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.
Diffstat (limited to 'c/src/exec/score')
-rw-r--r--c/src/exec/score/inline/object.inl2
-rw-r--r--c/src/exec/score/inline/rtems/score/object.inl2
-rw-r--r--c/src/exec/score/macros/object.inl2
-rw-r--r--c/src/exec/score/macros/rtems/score/object.inl2
4 files changed, 4 insertions, 4 deletions
diff --git a/c/src/exec/score/inline/object.inl b/c/src/exec/score/inline/object.inl
index 101779ea80..7e4d12aeec 100644
--- a/c/src/exec/score/inline/object.inl
+++ b/c/src/exec/score/inline/object.inl
@@ -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
diff --git a/c/src/exec/score/inline/rtems/score/object.inl b/c/src/exec/score/inline/rtems/score/object.inl
index 101779ea80..7e4d12aeec 100644
--- a/c/src/exec/score/inline/rtems/score/object.inl
+++ b/c/src/exec/score/inline/rtems/score/object.inl
@@ -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
diff --git a/c/src/exec/score/macros/object.inl b/c/src/exec/score/macros/object.inl
index 2865b1e23b..cce2cbde9b 100644
--- a/c/src/exec/score/macros/object.inl
+++ b/c/src/exec/score/macros/object.inl
@@ -62,7 +62,7 @@
*/
#define _Objects_Is_class_valid( _the_class ) \
- ( (_the_class) <= OBJECTS_CLASSES_LAST )
+ ( (_the_class) && (_the_class) <= OBJECTS_CLASSES_LAST )
/*PAGE
*
diff --git a/c/src/exec/score/macros/rtems/score/object.inl b/c/src/exec/score/macros/rtems/score/object.inl
index 2865b1e23b..cce2cbde9b 100644
--- a/c/src/exec/score/macros/rtems/score/object.inl
+++ b/c/src/exec/score/macros/rtems/score/object.inl
@@ -62,7 +62,7 @@
*/
#define _Objects_Is_class_valid( _the_class ) \
- ( (_the_class) <= OBJECTS_CLASSES_LAST )
+ ( (_the_class) && (_the_class) <= OBJECTS_CLASSES_LAST )
/*PAGE
*