]> git.mdlowis.com Git - projs/tide.git/commitdiff
fixed container_of macro
authorMichael D. Lowis <mike@mdlowis.com>
Thu, 15 Aug 2019 03:04:39 +0000 (23:04 -0400)
committerMichael D. Lowis <mike@mdlowis.com>
Thu, 15 Aug 2019 03:04:39 +0000 (23:04 -0400)
inc/stdc.h

index bc94b0bf72c871b9576bd6516cd16269acd37f5b..de96c2b228373910d96e9ac1ff71aa0fd3639431 100644 (file)
@@ -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) \