diff options
author | Gedare Bloom <gedare@rtems.org> | 2011-11-26 18:15:39 +0000 |
---|---|---|
committer | Gedare Bloom <gedare@rtems.org> | 2011-11-26 18:15:39 +0000 |
commit | b4959ec32751c2d4259dd05a143e7c6c816c1021 (patch) | |
tree | f8518d341000eb0cb7800b718e3d6c3b412349b4 /cpukit/score | |
parent | 2011-11-26 Gedare Bloom <gedare@rtems.org> (diff) | |
download | rtems-b4959ec32751c2d4259dd05a143e7c6c816c1021.tar.bz2 |
2011-11-26 Gedare Bloom <gedare@rtems.org>
PR 1963
* score/include/rtems/score/rbtree.h: Fix _RBTree_Container_of macro to
use correct arithmetic.
Diffstat (limited to 'cpukit/score')
-rw-r--r-- | cpukit/score/include/rtems/score/rbtree.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/cpukit/score/include/rtems/score/rbtree.h b/cpukit/score/include/rtems/score/rbtree.h index 1c7953ffad..f0e3b4b5c0 100644 --- a/cpukit/score/include/rtems/score/rbtree.h +++ b/cpukit/score/include/rtems/score/rbtree.h @@ -89,8 +89,11 @@ struct RBTree_Node_struct { * field name of the RBTree_Node structure in @a container_type. * */ -#define _RBTree_Container_of(node,container_type, node_field_name) \ - ((container_type*) (node - offsetof(container_type,node_field_name))) +#define _RBTree_Container_of(node, container_type, node_field_name) \ +( \ + (container_type*) \ + ( (uintptr_t)(node) - offsetof(container_type, node_field_name) ) \ +) /** * This type indicates the direction. |