[CRIU] [PATCH 1/2] types: Add ASSIGN_MEMBER helper

Cyrill Gorcunov gorcunov at openvz.org
Fri Jun 15 05:32:45 EDT 2012


Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 include/types.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/types.h b/include/types.h
index 29d1535..0792a78 100644
--- a/include/types.h
+++ b/include/types.h
@@ -181,6 +181,7 @@ typedef struct {
 #endif /* CONFIG_X86_64 */
 
 #define ASSIGN_TYPED(a,b) a = (typeof(a))b
+#define ASSIGN_MEMBER(a,b,m) (a)->m = (typeof((a)->m)) (b)->m
 
 #ifndef PAGE_SIZE
 # define PAGE_SIZE	4096
-- 
1.7.7.6



More information about the CRIU mailing list