Changeset b4959ec3 in rtems


Ignore:
Timestamp:
Nov 26, 2011, 6:15:39 PM (8 years ago)
Author:
Gedare Bloom <gedare@…>
Branches:
4.11, master
Children:
6fa94b7
Parents:
e3a1488a
Message:

2011-11-26 Gedare Bloom <gedare@…>

PR 1963

  • score/include/rtems/score/rbtree.h: Fix _RBTree_Container_of macro to use correct arithmetic.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    re3a1488a rb4959ec3  
     12011-11-26      Gedare Bloom <gedare@rtems.org>
     2
     3        PR 1963
     4        * score/include/rtems/score/rbtree.h: Fix _RBTree_Container_of macro to
     5        use correct arithmetic.
     6
    172011-11-26      Gedare Bloom <gedare@rtems.org>
    28
  • cpukit/score/include/rtems/score/rbtree.h

    re3a1488a rb4959ec3  
    9090 *
    9191 */
    92 #define _RBTree_Container_of(node,container_type, node_field_name) \
    93   ((container_type*) (node - offsetof(container_type,node_field_name)))
     92#define _RBTree_Container_of(node, container_type, node_field_name) \
     93( \
     94  (container_type*) \
     95    ( (uintptr_t)(node) - offsetof(container_type, node_field_name) ) \
     96)
    9497
    9598/**
Note: See TracChangeset for help on using the changeset viewer.