From d9c8b2b48ab5f510c412a600c8b839ade7c62953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20O=2E=20Sel=C3=A5sdal?= Date: Tue, 4 Dec 2012 23:24:05 +0100 Subject: [PATCH] don't use const in CONTAINER_OF --- include/ucore/ucore_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ucore/ucore_utils.h b/include/ucore/ucore_utils.h index 0c72564..fc389cc 100644 --- a/include/ucore/ucore_utils.h +++ b/include/ucore/ucore_utils.h @@ -46,7 +46,7 @@ //give us the struct foo*: //struct foo *f = CONTAINER_OF(p, struct foo, zap); #define CONTAINER_OF(ptr, type, member) ({ \ -const typeof( ((type *)0)->member ) *__mptr = (ptr); \ +typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type, member) ); }) #define UC_ALIGN(val,align) (((val)+(align)-1UL)&~((align)-1UL))