change log for rtems (2011-11-26)

rtems-vc at rtems.org rtems-vc at rtems.org
Sat Nov 26 19:12:18 UTC 2011


 *gedare*:
2011-11-26	Gedare Bloom <gedare at rtems.org>

	PR 1963
	* score/include/rtems/score/rbtree.h: Fix _RBTree_Container_of macro to
	use correct arithmetic.

M 1.2994  cpukit/ChangeLog
M    1.8  cpukit/score/include/rtems/score/rbtree.h

diff -u rtems/cpukit/ChangeLog:1.2993 rtems/cpukit/ChangeLog:1.2994
--- rtems/cpukit/ChangeLog:1.2993	Sat Nov 26 12:10:38 2011
+++ rtems/cpukit/ChangeLog	Sat Nov 26 12:15:39 2011
@@ -1,5 +1,11 @@
 2011-11-26	Gedare Bloom <gedare at rtems.org>
 
+	PR 1963
+	* score/include/rtems/score/rbtree.h: Fix _RBTree_Container_of macro to
+	use correct arithmetic.
+
+2011-11-26	Gedare Bloom <gedare at rtems.org>
+
 	PR 1964
 	* score/inline/rtems/score/chain.inl: Fix chain is first and last.
 

diff -u rtems/cpukit/score/include/rtems/score/rbtree.h:1.7 rtems/cpukit/score/include/rtems/score/rbtree.h:1.8
--- rtems/cpukit/score/include/rtems/score/rbtree.h:1.7	Thu Oct 20 06:58:54 2011
+++ rtems/cpukit/score/include/rtems/score/rbtree.h	Sat Nov 26 12:15:39 2011
@@ -89,8 +89,11 @@
  * 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.



--

Generated by Deluxe Loginfo [http://www.codewiz.org/projects/index.html#loginfo] 2.122 by Bernardo Innocenti <bernie at develer.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/vc/attachments/20111126/8c45f47f/attachment-0001.html>


More information about the vc mailing list