Author: tfaber
Date: Mon May 22 12:50:08 2017
New Revision: 74624
URL:
http://svn.reactos.org/svn/reactos?rev=74624&view=rev
Log:
[HHPCOMP]
- Avoid casting pointers to 'unsigned long'
Modified:
trunk/reactos/sdk/tools/hhpcomp/chmc/list.h
Modified: trunk/reactos/sdk/tools/hhpcomp/chmc/list.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/hhpcomp/chmc/lis…
==============================================================================
--- trunk/reactos/sdk/tools/hhpcomp/chmc/list.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/tools/hhpcomp/chmc/list.h [iso-8859-1] Mon May 22 12:50:08 2017
@@ -186,8 +186,13 @@
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
+#ifdef __REACTOS__
+#define list_entry(ptr, type, member) \
+ ((type *)((char *)(ptr)-(size_t)(&((type *)0)->member)))
+#else /* __REACTOS__ */
#define list_entry(ptr, type, member) \
((type *)((char *)(ptr)-(unsigned long)(&((type *)0)->member)))
+#endif /* __REACTOS__ */
/**
* list_for_each - iterate over a list