summaryrefslogtreecommitdiffstats
path: root/include/osmocom
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-02 07:59:00 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-05-02 07:59:00 +0200
commit780bba625d2d09478527ec6038f0f6e15eb6e651 (patch)
tree662df7bafe5bed48e9da1d9b61c82d0dbdac6639 /include/osmocom
parent97319359849cb21342a3243c6202def1cd18bc94 (diff)
linuxlist: Remove casting of ptr from container_of macro
The cast is not present in the original macro and was added in OpenBSC with commit (be68f6fc6cde1367a4481d2e774a64e2cd657267) to help using the header with C++. Due the recent issue in the bssgp flow control code, let's remove the cast to see wrong pointer usage. In case C++ code doesn't compile anymore we can see how to add a cast back to it. Change was proposed by Michael McTernan
Diffstat (limited to 'include/osmocom')
-rw-r--r--include/osmocom/core/linuxlist.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/osmocom/core/linuxlist.h b/include/osmocom/core/linuxlist.h
index b6841520..a8a28ee7 100644
--- a/include/osmocom/core/linuxlist.h
+++ b/include/osmocom/core/linuxlist.h
@@ -17,7 +17,7 @@ static inline void prefetch(const void *x) {;}
*
*/
#define container_of(ptr, type, member) ({ \
- const typeof( ((type *)0)->member ) *__mptr = (typeof( ((type *)0)->member ) *)(ptr); \
+ const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type, member) );})