From: Michael D. Lowis Date: Thu, 15 Aug 2019 03:04:39 +0000 (-0400) Subject: fixed container_of macro X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=1f19101f8aeaac73bbf3645ec5aec84ebb0f990c;p=projs%2Ftide.git fixed container_of macro --- diff --git a/inc/stdc.h b/inc/stdc.h index bc94b0b..de96c2b 100644 --- a/inc/stdc.h +++ b/inc/stdc.h @@ -175,7 +175,7 @@ static inline char* _getopt_(int* p_argc, char*** p_argv) { #ifndef container_of #define container_of(obj, type, member) \ - (type*)((uintptr_t)obj - offsetof(type, member)) + ((type*)((uintptr_t)obj - offsetof(type, member))) #endif #define concat(a,b) \